bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possibly a bug found


From: Jean-Philippe Guérard
Subject: Re: Possibly a bug found
Date: Sat, 12 Sep 2009 09:53:33 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

Le 2009-09-12 15:05:19 +1100, Igor Zhuravlov écrivait :
> Good day.
> 
> Following command fails to find two consequent newline chars:
> 
> echo -e "aaa\n\nbbb" | gawk 'BEGIN {s="";} {s=s "\n" $0;} END {print 
> match(s,"\n{2,}");}'

You need to add the --re-interval option to gawk for this to work.

> Workaround:
> 
> echo -e "aaa\n\nbbb" | gawk 'BEGIN {s="";} {s=s "\n" $0;} END {print 
> match(s,"\n\n+");}'

Regards.

-- 
Jean-Philippe Guérard
http://tigreraye.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]