On Tuesday 02 May 2006 19:34, Niall O Broin wrote:
> Well, so far we've had offers in perl, and a combo. of awk & shell,
> but for the life of me, unless there's something Tim hasn't told us
> (in which case presumably the other offers will also be wrong), I
> don't see why anything more than
>> grep -A 1 Tom FILE
>> is needed.
Thanks for the suggestion -
I didn't know (or had forgotten) the -A option for grep.
However, my question was badly posed.
I didn't mean to imply that the records were all 2 lines long,
or that the sought for word appeared in the first line of the record.
I'm just testing the many proposed solutions -
thanks for the response -
and will sent the usual prize to the winner.
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!