首页 > 其他 > 详细

BASH:Output specified line

时间:2020-04-28 11:39:03      阅读:67      评论:0      收藏:0      [点我收藏+]

sed -i ‘s/111/222/g‘ input.txt

awk ‘NR == 2‘ input.txt  #output line2
sed -n 2p input.txt      #output line2

tail -n2 input.txt  #only output the last two lines
tail -n+2 input.txt #from line2 to end
tail -n+2 input.txt|head -n1 #only output line2

BASH:Output specified line

原文:https://www.cnblogs.com/xinyueliu/p/12792872.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!