SEO対策

Linux sed的学习 打印命令

学习使用-n显示行



sed -n '1,5p' 1.txt
将把1.txt的第一行到第五行打印出来

sed -n '5p' 1.txt
将把1.txt的第五行打印出来

5p的意思是第五行print p -- print
-n : suppress automatic printing of pattern space

如果不加上-n的话,sed -n '5p' 1.txt将先打出来第五行,然后再把1.txt的所有内容打出来

sed -n '/sed/p' 1.txt
将把含有sed这个词的行打出来

sed -n '3,/sed/p' 1.txt
将把1.txt第三行之后含有sed这个词的行打出来

sed -n '/sed/=' 1.txt
将把含有sed这个词的行的行号打出来,只打出行号,没有文字

sed -n '1,$p' 1.txt
将打出来所有行,$代表了最后一行

2009-06-16 10:34:29 のブログ記事
twitter

等待ipad 4.2破解

开始看雷蒙德·卡佛的短篇集。。。

等待touch3破解,geohot is real man

cts-v这汽车真是太猛了!!!!

终于拿到了签证.....

雅歌塔克里斯多夫的《第三谎言》,已经看完了

两个前轮胎换成了普利司通的了,后面两个什么时候才能换呢????

在女朋友的允许下我终于买了ndsi

It was the best of times. It was the worst of times --《A Tale of Two Cities》

《神经浪游者》阅读到第18页。。。。没时间看了。。。可能再也看不完了

Philip Kindred Dick的《Minority Report》已经看完了。。。。。

Rss Space