Skip to content

Instantly share code, notes, and snippets.

@gdm
Created March 28, 2019 20:10
Show Gist options
  • Select an option

  • Save gdm/0578b78cb8435a25833403146ae6ba88 to your computer and use it in GitHub Desktop.

Select an option

Save gdm/0578b78cb8435a25833403146ae6ba88 to your computer and use it in GitHub Desktop.
# rename files with complex names
j=1
for f in *.jpg ; do
echo "mv '$f' p${j}.jpg"
j=$((j+1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment