Skip to content

Instantly share code, notes, and snippets.

@defp
Created October 13, 2011 15:08
Show Gist options
  • Select an option

  • Save defp/1284456 to your computer and use it in GitHub Desktop.

Select an option

Save defp/1284456 to your computer and use it in GitHub Desktop.
rename.sh
#/bin/bash
ls *.JPG >file.txt
for i in $(cat file.txt)
do
name=$(echo $i.jpg)
mv $i $name
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment