|

楼主 |
发表于 2005-12-12 12:55:30
|
显示全部楼层
Post by yongjian
- cat a1.file | sed -n '/^[0-9] /s/0\.0\+//gp' | paste - a2.file
复制代码 try this. It only print out the matching lines, after this, you will need to paste it back to the file. A solution but not the ideal one.
To yongjian:
先谢谢你的回复。你给的语句我的理解是:把文件a1.file中关于0.0000的所有行用空格代替,然后把文件a2.file粘贴到此处。
问题1:当我运行此语句时,仅cat a2.file起作用,a2.file的内容显示在当前屏幕。
问题2:paste命令能够将a2.file粘贴到前面删除的那些数据的位置上吗?起这个作用的命令我未查到。 |
|