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
尝试以下脚本:
计算.sh
这应该适合你:
./numerate.sh -d <your image folder> -b <start number> -p image_ -s .jpg -o numerically -r