Skip to content

Instantly share code, notes, and snippets.

@jcarolinares
Last active June 13, 2019 10:35
Show Gist options
  • Save jcarolinares/f45667f1c6268488e5c8978a8a00253a to your computer and use it in GitHub Desktop.
Save jcarolinares/f45667f1c6268488e5c8978a8a00253a to your computer and use it in GitHub Desktop.
Massive renaming bash script
#!/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