Skip to content

Commit 7e423c2

Browse files
committed
Add remove_dup_dirs script
1 parent bfed5f5 commit 7e423c2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

scripts/remove_dup_dirs.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#! /bin/bash
2+
3+
# ------------------------------------------------------------------------------
4+
# remove_dup_dirs.sh
5+
# published as part of https://github.com/pConst/basic_verilog
6+
# Konstantin Pavlov, pavlovconst@gmail.com
7+
# ------------------------------------------------------------------------------
8+
9+
# Utility script to iterate through all subdirectories in the working directory
10+
# and try to find duplicate subdirectories in selected location.
11+
# Duplicate subdirs in selected location will be removed
12+
13+
shopt -s nullglob
14+
15+
for dir in */
16+
do
17+
#echo "-- Inspecting $dir"
18+
19+
if [ -d "$1$dir" ]; then
20+
#echo "= $1$dir"
21+
rm -rfv $1$dir
22+
else
23+
echo "unique"
24+
fi
25+
26+
done

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy