Skip to content

Instantly share code, notes, and snippets.

@cmuench
Created August 13, 2014 15:57
Show Gist options
  • Save cmuench/11d7fe24cdeb1949c4f8 to your computer and use it in GitHub Desktop.
Save cmuench/11d7fe24cdeb1949c4f8 to your computer and use it in GitHub Desktop.
Rename Files
#!/bin/bash
if [ $# -lt 3 ]; then
echo "Example: pdf old * -> Rename extension pdf to old"
fi
files=${@:3:1000}
rename "s/.$1/.$2/" $files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment