上答案:
sed 's/^/Other Error Count : /g'
例子如下:在第一列插入count:的实现方式
[@sbin]# cat a.txt
1
2
3
4
[@bsbin]# cat a.txt |sed 's/^/count:/g'
count:1
count:2
count:3
count:4
本文介绍如何利用sed命令实现在文本文件的每行开头插入指定文本。通过具体示例展示了sed命令的强大功能及其基本语法。
上答案:
sed 's/^/Other Error Count : /g'
例子如下:在第一列插入count:的实现方式
[@sbin]# cat a.txt
1
2
3
4
[@bsbin]# cat a.txt |sed 's/^/count:/g'
count:1
count:2
count:3
count:4

被折叠的 条评论
为什么被折叠?