mv 命令不像 grep 那样接受模式匹配!
处理这种操作和类似操作的好方法是什么?
最佳答案
有重命名
工具,但如果这不是您想要的,您可以这样做:
for file in *; do
new_file="${file##[0-9]}" # Strip all leading numbers
mv "$file" "$newfile"
done
关于linux - Bash 脚本 : How do I rename files to remove numeric characters at the beginning?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3064089/