On Sat, Jul 12, 2008 at 9:45 PM, Uri Guttman wrote:
Uri> amusing since awk supports the .. concept and perl stole from awk.
my
Uri> awkfu is extremely corroded but iirc, you just have pair of
patterns
Uri> separated with , before the block of code. something like this:
Uri>
Uri> /^'$*' ()/, /^}$/ {do something here like print}
Sure enough, awk works exactly like you say, and the gawk manapage (on
cygwin) documents it. Here is my test using the simplified awk syntax:
[EMAIL PROTECTED] CTS4.run.2008-06-27T13_58_45,500]$ awkfunc () { set |
awk '/^'$*' ()/,/^}$/'; } [EMAIL PROTECTED]
CTS4.run.2008-06-27T13_58_45,500]$ awkfunc awkfunc
awkfunc ()
{
set | awk '/^'$*' ()/,/^}$/'
}
[EMAIL PROTECTED] CTS4.run.2008-06-27T13_58_45,500]$
thanks Uri,
--
Bob
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm