Created
March 28, 2018 01:52
-
-
Save jihyeonRyu/0cca62166df0e4fd2cffb7301b2c669a to your computer and use it in GitHub Desktop.
renaming dir name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cnt=0 | |
for NAME in *; do | |
if [[ -d $NAME ]]; then | |
NEWNAME=`echo $cnt`; | |
`echo $NAME $NEWNAME` | |
mv $NAME $NEWNAME; | |
((cnt++)) | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment