ファイル名の変更

カレントディレクトリにある特定のパターンのファイル名C219-1234.htmlを1234.htmlに変更する。

ls -1 [cC]219[0-9]*.html | \
awk '{print $1,$1}' | \
sed -e 's/l [cC]219/l /' | \
awk '{cmd = "mv " $1 " " $2;system(cmd);}'

コメントする

This site uses Akismet to reduce spam. Learn how your comment data is processed.