我想根据我将提供的文本列表重命名特定路径中的文件夹名称。 例如,我有如下文件夹列表结构:
/home/XXX-01/$file1
/home/XXX-12/$file2
/home/XXX-23/$file66
/home/XXX-32/$file44
/home/XXX-123/$file65
和rand.txt文件,详细说明需要更改的文件夹名称,例如
XXX-22
XXX-33
XXX-55
XXX-4321
XXX-24456
最终的文件夹结构如下
/home/XXX-22/$file1
/home/XXX-33/$file2
/home/XXX-55/$file66
/home/XXX-4321/$file44
/home/XXX-24456/$file65
多谢各位
使用GNU awk版本4.0.2
一艘班轮:
一旦您对命令的外观感到满意,就可以通过管道传输到bash/sh等来执行
相关问题 更多 >
编程相关推荐