我有一个包含这一行的文件。正则表达式^ A和^ S?不能够sed或grep吗?
输入
sls="N" stnid="armID"
sls="N" stnid="C-ARM #11 w^Aw^Aw^A^Sg^Aw"
sls="N" stnid="virtualID"
对于我其中我要像
sls="N" stnid="armID"
sls="N" stnid=""
sls="N" stnid="virtualID"
欲sed的 “C-ARM#11瓦特^胡^胡^ A^SG ^胡” 的输出和用空白替换它。
问题是没有正则表达式,我可以找到它将取代它。
我试过sed -e s //^// g s/A // g myfile> newfile。
它没有工作。
还有一个问题是,当我CAT我的文件,它不显示我的^ A &^S字符。 文件看起来像这样。
sls="N" stnid="armID"
sls="N" stnid="C-ARM #11 wwwgw"
sls="N" stnid="virtualID"
请帮助,在此先感谢。
Pal
如果你没有看到他们时,你'cat'文件,它们是'control-A'字符,而不是'^'后面是'A'。 – Barmar 2013-04-08 18:44:53