Re: matching pattern over multiple lines




Ed Morton wrote:
sandeepsinghal@xxxxxxxxx wrote:
Sashi wrote:


[Untested]
awk '/Select/,/;/' your_input_file
Watch out for case-sensitivity. Select is different from select.
HTH,
Sashi


doesn't work ... can you please elaborate on the above ... it gives a
parse error in its current form and since I did not understand it, I
could not really tweak it.

You're probably using old, broken awk. Use any of:

gawk (GNU awk)
nawk (New awk)
/usr/xgp4/bin/awk (on Solaris)
mawk
tawk

Regards,

Ed.

Yes, I was using a broken awk. It works fine now. Thanks Sashi, Ed

.



Relevant Pages

  • Re: matching pattern over multiple lines
    ... Watch out for case-sensitivity. ... can you please elaborate on the above ... ... parse error in its current form and since I did not understand it, ... gawk (GNU awk) ...
    (comp.unix.shell)
  • Re: matching pattern over multiple lines
    ... Watch out for case-sensitivity. ... can you please elaborate on the above ... ... parse error in its current form and since I did not understand it, ...
    (comp.unix.shell)