Return to Snippet

Revision: 3728
at September 7, 2007 14:58 by ches


Initial Code
ls foo*.jpg | awk '{print("mv "$1" "$1)}' | sed 's/foo/bar/2' | /bin/sh

Initial URL
http://www.macosxhints.com/article.php?story=20010509130450691

Initial Description
Leave off the final pipe to /bin/sh to do a 'dry run'

Initial Title
Batch File Rename with awk and sed

Initial Tags
Bash, script

Initial Language
Bash