Created
November 19, 2012 14:03
-
-
Save ryoco/4110809 to your computer and use it in GitHub Desktop.
rename(replace) filenames
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for filename in `ls FOO_*.html`; do newname=`echo $filename | sed -e 's/FOO/BAR/g'`; mv $filename $newname; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bash/zsh 拡張使っても問題ない場面であれば以下のようにも書ける。