bash - 用于在 bash 中更改文件名前缀的脚本

标签 bash sed awk

来自

abcd_if_vb.c
abcd_if_av.c

edfg_if_vb.c
edfg_if_av.c

问题是要捕获什么文件有 abcd 前缀。

最佳答案

不是真的。

for file in abcd*
do
  mv "$file" "edfg${file#abcd}"
done

关于bash - 用于在 bash 中更改文件名前缀的脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13215666/

相关文章:

linux - 前台程序和后台程序有什么区别?

regex - 基于正则表达式的 grep 不匹配任何内容

linux - 运行 awk 命令删除最后一列后保留分隔符 '\t'

sed - 结合两个 sed 命令

linux - 如何获取此内容中的所有 ipv4 地址

bash - 根据 bash 中的字段值合并列

linux - 执行嵌套 bash 脚本时找不到命令

linux - 自定义日志处理/解析

linux - sed 用空格和特殊字符替换字符串

linux - Bash 脚本 linux : Lay-out and output of a script