sed 2例

收藏下,以后用

sed -n ’1,$n;p’  filename

可以打印出文件的偶数行

sed -n ’2,$n;p’ filename

可以打印出文件的奇数行

About mrhaigui

激烈的理想主义者...需提防蜕变为彻底的虚无主义者...
This entry was posted in Linux. Bookmark the permalink.

留下评论

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>