Re: head and tail

2008-02-26 Thread demerphq
On 25/02/2008, David Cantrell wrote: > On Mon, Feb 25, 2008 at 09:38:47PM +0100, Philip Newton wrote: > > On Mon, Feb 25, 2008 at 9:36 PM, Peter da Silva wrote: > > > I kind of have a teenie bit of software hate for things like "foo | > > > awk ..." instead of "awk 'foo-equiv && /whatever/'

Re: head and tail

2008-02-26 Thread Jonathan Stowe
On Mon, 2008-02-25 at 21:53 +, David Cantrell wrote: > On Mon, Feb 25, 2008 at 09:38:47PM +0100, Philip Newton wrote: > > On Mon, Feb 25, 2008 at 9:36 PM, Peter da Silva wrote: > > > I kind of have a teenie bit of software hate for things like "foo | > > > awk ..." instead of "awk 'foo-equi

Re: head and tail

2008-02-26 Thread Peter da Silva
On 2008-02-25, at 15:58, Walt Mankowski wrote: The sed solution's cute, but you can easily ignore the first line in pure awk without even using any of the hateful gawk extensions: awk 'NR != 1 { print }' That's what I originally wrote, I changed it to 'foo-equiv' because I'm stupid. Or

Re: head and tail

2008-02-25 Thread Walt Mankowski
On Mon, Feb 25, 2008 at 02:36:30PM -0600, Peter da Silva wrote: > On 2008-02-25, at 13:22, Jeremy Stephens wrote: >> I found myself needing to run awk on all the lines of a text file >> except the first one. > > I kind of have a teenie bit of software hate for things like "foo | awk > ..." instead

Re: head and tail

2008-02-25 Thread David Cantrell
On Mon, Feb 25, 2008 at 09:38:47PM +0100, Philip Newton wrote: > On Mon, Feb 25, 2008 at 9:36 PM, Peter da Silva wrote: > > I kind of have a teenie bit of software hate for things like "foo | > > awk ..." instead of "awk 'foo-equiv && /whatever/' ...", > Ah yes, like "bla | grep blabla | awk 'p

Re: head and tail

2008-02-25 Thread Andy Dougherty
On Mon, 25 Feb 2008, Jeremy Stephens wrote: > I found myself needing to run awk on all the lines of a text file > except the first one. So I look at some man pages. It turns out > that head will accept negative numbers, but tail won't. At least in > my Ubuntu Gutsy installation it won't. I'

Re: head and tail

2008-02-25 Thread Bruce Richardson
On Mon, Feb 25, 2008 at 02:36:30PM -0600, Peter da Silva wrote: > On 2008-02-25, at 13:22, Jeremy Stephens wrote: > >I found myself needing to run awk on all the lines of a text file > >except the first one. > > I kind of have a teenie bit of software hate for things like "foo | > awk ..." inste

Re: head and tail

2008-02-25 Thread Philip Newton
On Mon, Feb 25, 2008 at 9:36 PM, Peter da Silva wrote: > I kind of have a teenie bit of software hate for things like "foo | > awk ..." instead of "awk 'foo-equiv && /whatever/' ...", Ah yes, like "bla | grep blabla | awk 'print $NF'" instead of "bla | awk '/blabla/ { print $NF }", for example

Re: head and tail

2008-02-25 Thread Peter da Silva
On 2008-02-25, at 13:22, Jeremy Stephens wrote: I found myself needing to run awk on all the lines of a text file except the first one. I kind of have a teenie bit of software hate for things like "foo | awk ..." instead of "awk 'foo-equiv && /whatever/' ...", but that's mostly leftover ha

head and tail

2008-02-25 Thread Jeremy Stephens
I found myself needing to run awk on all the lines of a text file except the first one. So I look at some man pages. It turns out that head will accept negative numbers, but tail won't. At least in my Ubuntu Gutsy installation it won't. Boo. -- Jeremy Stephens Computer Systems Analyst I