标签:sed
如string.txt文件是这样的zhangsan
13554442907
lisi
13619299998
xiaowang
15128392967
laoma
18192266211
zhaosi
15528224682
将string.txt改成如下
zhangsan:13554442907
lisi:13619299998
xiaowang:15128392967
laoma:18192266211
zhaosi:15528224682
sed ‘N;s@\n@:@‘ string.txt
标签:sed
原文地址:http://blog.51cto.com/13480443/2088215