B
Bob
Hi...
I have a text file that looks like this:
title: fdsfdsfsd fdsfdsf
number: 234234234234324243
animal: pig
title: sf32erweff fwef wef we
number: 456456456
animal: hen
title: cvbvcxvcxvcvvc
number: 340320324032403
animal: horse
....
...
..
I want to 'grep' for a string whose line begins with title (^title) and
if found
automatically print out that line AND the following 2 lines.
I don't want to use SED, but PERL.
Anyone of you gurus able to assist on how to do this in PERL?
thanks
Bob
I have a text file that looks like this:
title: fdsfdsfsd fdsfdsf
number: 234234234234324243
animal: pig
title: sf32erweff fwef wef we
number: 456456456
animal: hen
title: cvbvcxvcxvcvvc
number: 340320324032403
animal: horse
....
...
..
I want to 'grep' for a string whose line begins with title (^title) and
if found
automatically print out that line AND the following 2 lines.
I don't want to use SED, but PERL.
Anyone of you gurus able to assist on how to do this in PERL?
thanks
Bob