Sed - An Introduction and Tutorial by Bruce Barnett
发布时间:2021-01-25 01:43:44 所属栏目:Linux 来源:网络整理
导读:http://www.grymoire.com/unix/sed.html Quick Links - NEW table border="1" tr Sed Pattern Flags /tr tr td a href="http://www.grymoire.com/unix/Sed.html#uh-6"gt;/g?- Global/td /tr tr td a href="http://www.grymoire.com/unix/Sed.html#uh-10a"gt;
Removing comments and blank lines takes two commands. The first removes every character from the "#" to the end of the line,and the second deletes all blank lines: sed -e 's/#.*//' -e '/^$/ d' A third one should be added to remove all blanks and tabs immediately before the end of line: sed -e 's/#.*//' -e 's/[ ^I]*$//' -e '/^$/ d' (编辑:ASP站长) 【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。 |
相关内容
未处理完善
-
无相关信息
最新更新