简体   繁体   English

Fish shell 中的批量重命名

[英]Batch Rename in Fish shell

I get 15 or 20 files every week with random names that include several symbols such as !我每周收到 15 或 20 个随机名称的文件,其中包含多个符号,例如! , ' etc. Plus there is space . , '等。另外还有space So I need to replace space with _ , and any other symbols to nothing before I can pass them to another script.因此,我需要将space替换为_ ,并将任何其他符号替换为空,然后才能将它们传递给另一个脚本。 I use thunar for the job now, but I'll very much like to automate it in the script.我现在使用thunar来完成这项工作,但我非常希望在脚本中自动化它。 I'm using fish shell.我正在使用fish shell。

Okay, I find an old tool called rename .好的,我找到了一个名为rename的旧工具。 It did the trick without using sed or any complex command.它在不使用sed或任何复杂命令的情况下成功了。

http://rename.sourceforge.net/ http://rename.sourceforge.net/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM