Skip to content

Instantly share code, notes, and snippets.

@jihyeonRyu
Created March 28, 2018 01:52
Show Gist options
  • Save jihyeonRyu/0cca62166df0e4fd2cffb7301b2c669a to your computer and use it in GitHub Desktop.
Save jihyeonRyu/0cca62166df0e4fd2cffb7301b2c669a to your computer and use it in GitHub Desktop.
renaming dir name
#!/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