Jun 11, 2004 #1 Petemush Technical User Joined Jun 21, 2002 Messages 255 Location 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 1 #2 nawlej Programmer Joined Mar 26, 2004 Messages 380 Location US tail +2? Upvote 0 Downvote
Jun 11, 2004 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location 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 15, 2004 #4 screwloose MIS Joined Apr 13, 2004 Messages 316 Location US tail +2l Upvote 0 Downvote
Jun 17, 2004 1 #5 segment ISP Joined Jun 15, 2004 Messages 225 Location 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 Joined Jun 15, 2004 Messages 225 Location 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 Joined Feb 26, 2002 Messages 286 Location US More sed sed '1d' sed '2,$!d' Cheers, ND bigoldbulldog@hotmail.com Upvote 0 Downvote
Jun 21, 2004 #8 guggach Programmer Joined Jun 10, 2004 Messages 159 Location 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 Joined Jun 21, 2002 Messages 255 Location GB Thanks everyone for that, and there was me thinking there wasn't even one way! Upvote 0 Downvote