Jun 11, 2004 #1 Petemush Technical User Jun 21, 2002 255 GB Hello again! Does anyone know how to return an entire file apart from the first line? Like using tail? So I have a file: 1233 125457 123214235 213123 and I want the following returned: 125457 123214235 213123 Cheers,
Hello again! Does anyone know how to return an entire file apart from the first line? Like using tail? So I have a file: 1233 125457 123214235 213123 and I want the following returned: 125457 123214235 213123 Cheers,
Jun 11, 2004 #3 PHV MIS Nov 8, 2002 53,708 FR The awk way: awk 'NR>1' /path/to/file The tail way: tail +2l /path/to/file Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
The awk way: awk 'NR>1' /path/to/file The tail way: tail +2l /path/to/file Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
Jun 17, 2004 1 #5 segment ISP Jun 15, 2004 225 US the sed way sed -n '2,4p' A lot shorter sil lynx -dump 0xD1.0x5E.0x7B.0x9B/ewps|perl http://www.politrix.org Upvote 0 Downvote
the sed way sed -n '2,4p' A lot shorter sil lynx -dump 0xD1.0x5E.0x7B.0x9B/ewps|perl http://www.politrix.org
Jun 17, 2004 #6 segment ISP Jun 15, 2004 225 US the sed way sed -n '2,4p' filename A lot shorter sil lynx -dump 0xD1.0x5E.0x7B.0x9B/ewps|perl http://www.politrix.org Upvote 0 Downvote
the sed way sed -n '2,4p' filename A lot shorter sil lynx -dump 0xD1.0x5E.0x7B.0x9B/ewps|perl http://www.politrix.org
Jun 17, 2004 1 #7 bigoldbulldog Programmer Feb 26, 2002 286 US More sed sed '1d' sed '2,$!d' Cheers, ND bigoldbulldog@hotmail.com Upvote 0 Downvote
Jun 21, 2004 #8 guggach Programmer Jun 10, 2004 159 CH bigoldbulldog's first is simply elegant. the second, need sed knowledge... guggach Upvote 0 Downvote
Jun 28, 2004 Thread starter #9 Petemush Technical User Jun 21, 2002 255 GB Thanks everyone for that, and there was me thinking there wasn't even one way! Upvote 0 Downvote