Skip to content

Instantly share code, notes, and snippets.

@drewgates
Created September 16, 2016 14:10
Show Gist options
  • Save drewgates/8d6fdc56e55586ef15882681aec6788b to your computer and use it in GitHub Desktop.
Save drewgates/8d6fdc56e55586ef15882681aec6788b to your computer and use it in GitHub Desktop.
Prepend a string "nt_" to the name every file of a type ".jpg" in a directory.
#for each .jpg in this directory, make a copy with "nt_" prepended to the file name (ex. "cp example.jpg nt_example.jpg")
FILES=*.jpg
for f in $FILES
do
cp "$f" "nt_$f"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment