[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: only output the nth line



Jozsi Vadkan wrote:
I have a file:

<snip>


And i want to only output the first, second, and fourth line to another
file.

The:

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


hugo@debian:~$ sed -n '1,2p;4p' file.txt
daemon
1):
0

ii  sed                    4.1.5-8                The GNU sed stream editor

Hugo


Reply to: