Skip to content

Instantly share code, notes, and snippets.

@johnrengelman
Created April 29, 2013 17:49
Show Gist options
  • Save johnrengelman/5483366 to your computer and use it in GitHub Desktop.
Save johnrengelman/5483366 to your computer and use it in GitHub Desktop.
Find all files that match a pattern and rename them to a new naming convention.
find . -name "Service*.json" | awk '{orig=$1;mod=$1;sub(/Service/,"",mod);sub(/.json/,"Service.json");print("git mv "orig" "mod)}' | /bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment