Last active
June 13, 2019 10:35
-
-
Save jcarolinares/f45667f1c6268488e5c8978a8a00253a to your computer and use it in GitHub Desktop.
Massive renaming bash script
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 | |
#Massive renaming of files call it: ./rename.sh base_name | |
N=1 | |
name=$1 | |
for file in *.jpg; do | |
full_name=$name"_$N.jpg" | |
mv "$file" $full_name | |
let N=N+1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment