sed 类似awk的用法
时间:2008-04-08 来源:codfei
标记一下 具有通用性
debian:/home/yupf# sed "s/\(^[^ ]*\) \([^:]*\)/\2 \1/g" 1
column2 column1:333
column2 column1:888
debian:/home/yupf# cat 1
column1 column2:333
column1 column2:888
debian:/home/yupf# sed "s/\(^[^ ]*\) \([^:]*\)/\2 \1/g" 1
column2 column1:333
column2 column1:888
debian:/home/yupf# cat 1
column1 column2:333
column1 column2:888
相关阅读 更多 +