Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
接頭辞「ファイル」と乱数の接尾辞が付いたファイル名があります。例えば:
file2344, file1244, file123, file12345, file0012
配列でうまく機能するように、連番で名前を変更したファイルを作成したいと思います。例えば:
file1, file2, file3, file4, file5
どうすればこれを達成できますか?
そんな感じ:
i=1 for f in file*; do mv "$f" file$i i=$((i+1)) done
次のスクリプトを試してください。
numerate.sh
これはあなたのために働くはずです:
./numerate.sh -d <your image folder> -b <start number> -p image_ -s .jpg -o numerically -r