only output the nth line

Markus Schönhaber ubuntu-users at list-post.mks-mail.de
Wed May 12 17:25:40 UTC 2010


12.05.2010 18:58, Jozsi Vadkan:

> And i want to only output the first, second, and fourth line to another
> file.
> 
> sed -n '1,2p;4p' file.txt

sed -n '1p;2p;4p' file.txt

-- 
Regards
  mks




More information about the ubuntu-users mailing list