Skip to content

Instantly share code, notes, and snippets.

@lantrix
Created September 18, 2015 04:37
Show Gist options
  • Select an option

  • Save lantrix/467350972bfc72d90fe7 to your computer and use it in GitHub Desktop.

Select an option

Save lantrix/467350972bfc72d90fe7 to your computer and use it in GitHub Desktop.
rename many files with different extensions in bash
for f in *_*; do echo mv "${f}" "${f//_/-}"; done
for f in *_*; do echo mv "${f}" "NewPrefix${f/OldPrefix/}"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment