Created
January 14, 2020 07:11
-
-
Save sipadan2003/fe913b5aac657be280d4eb3d796d5e8d to your computer and use it in GitHub Desktop.
This file contains 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 | |
num2=79 | |
for num1 in `seq 40 60`; do | |
old_name=`printf "a_%03d" $num1` | |
new_name=`printf "a_%03d" $num2` | |
if [ -e ${old_name} ] && [ ! -e ${new_name} ]; then | |
mv ${old_name} ${new_name} | |
fi | |
num2=`expr ${num2} + 1` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment