Skip to content

Instantly share code, notes, and snippets.

@dylanhthomas
Created June 18, 2013 16:40
Show Gist options
  • Save dylanhthomas/5807032 to your computer and use it in GitHub Desktop.
Save dylanhthomas/5807032 to your computer and use it in GitHub Desktop.
You can adapt this for any filename find/replace, but I find it most useful for changing a directory of .html files to .php files.
for file in *.html ; do mv $file `echo $file | sed 's/\(.*\.\)html/\1php/'` ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment