我想重新命名bash中的某些zip文件,但是我似乎缺少一些東西。有什麼建議麼??Bash shell:如何添加名稱
我的目標:
- 將文件移動到一個原稿目錄
- 重命名的名稱
代碼中的 「_orig」 原始文件伊夫試着寫:
mv -v $PICKUP/*.zip $ORIGINALS
for origfile in $(ls $ORIGINALS/*.zip);do
echo "Adding _orig to zip file"
echo
added=$(basename $origfile '_orig').zip
mv -v $ORIGINALS/$origfile.zip $ORIGINALS/$added.zip
done
對不起,還是有點新。
謝謝重命名是我需要 –
** + 1 ** - 好建議。 – ghoti