User error or awk bug?

Michel Talon talon at lpthe.jussieu.fr
Fri Jan 15 21:55:21 UTC 2010


awk doesn't use perl or python type regular expressions but much
simpler ones, called "extended". Your constructs are managed by Gnu awk
with the --posix option only. The following achieves what you want in 
a simpler way


niobe% echo "/"|awk 'gsub(/\/+/,"/")'
/
niobe% echo "//"|awk 'gsub(/\/+/,"/")'
/

-- 

Michel TALON



More information about the freebsd-hackers mailing list