User error or awk bug?

Garrett Cooper yanefbsd at gmail.com
Fri Jan 15 21:56:56 UTC 2010


On Fri, Jan 15, 2010 at 1:21 PM, George Mitchell <george at m5p.com> wrote:
> Try quoting the "/\/{2,}/" in your call to gsub.         -- George

    Doesn't work :(...:

nawk (FreeBSD) --
[gcooper at optimus ~]$ echo //////// | awk '{ gsub ("//{2,}/", "/"); print }'
////////

gawk (Gentoo Linux) --

gcooper at orangebox /scratch/ltp/scripts $ echo //////// | awk '{ gsub
("//{2,}/", "/"); print }'
////////

Thanks!
-Garrett


More information about the freebsd-hackers mailing list