ワイルドカードを使用して名前を変更する

ワイルドカードを使用して名前を変更する

renameコマンドを使用して複数のファイルの名前を変更しようとします。

Blue - This file is called Blue ok.txt
Red - This file is called Red ok.txt
Orange and Yellow - This file is called Orange and Yellow ok.txt

...入力する:

Blue.txt
Red.txt
Orange and Yellow.txt

途中のワイルドカードを理解していません。私は試した:

rename -f 's/ - This file is called* ok//gi' *.txt

ベストアンサー1

おすすめ記事