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 of "awk 'foo-equiv && /whatever/' ...", but that's mostly > leftover hate from the PDP-11 and Xenix-286 days when that much overhead > mattered. > > On the other hand I find myself using 'sed 5q' rather than 'head -4' (or > whatever) because I'm used to 'head' not even being there. > > I suppose you could use 'sed 1d | awk' to compound things and make my > brain explode. :)
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 }' Walt