Skip to content

Instantly share code, notes, and snippets.

@hagope
Created July 9, 2012 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hagope/3074771 to your computer and use it in GitHub Desktop.
Save hagope/3074771 to your computer and use it in GitHub Desktop.
bash script to deleting leading chars of file names in directory
#!/bin/bash
a=1
for i in *.jpg; do
new=${i:9}
mv "${i}" "${new}"
let a=a+1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment