【发布时间】:2020-10-20 20:29:27
【问题描述】:
我正在尝试运行以下命令以顺序重命名以001 开头的图像文件。当我运行命令时出现错误
No such file or directory
我需要对我的脚本进行哪些更改才能使其运行?
echo "Enter the file path"
read path
cd $path
num=0
for file in *.tif; do
num=$((num+1))
mv "$file" "$(printf "%03d%s.tif" "$i")"
done
【问题讨论】: