awk gsub problem
Wed Sep 15 23:43:00 GMT 2010
I don't know if this is just a problem with the cygwin version of awk,
me misunderstanding something or what, but it looks like gsub isn't
working correctly in awk:
$ sh /tmp/test.awk
s= ::0:: should = ::S0::
$ cat /tmp/test.awk
printf("s= ::%s:: should = ::S0::\n", s)
I also tried it with IGNORECASE=0 and with "awk --traditional" - same results.
$ which awk
$ awk --version
GNU Awk 3.1.8
Copyright (C) 1989, 1991-2010 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
--- on a Linux box & it works the way I expected:
% sh /tmp/test.awk
s= ::S0:: should = ::S0::
% awk --version
GNU Awk 3.1.5
Copyright (C) 1989, 1991-2005 Free Software Foundation.
... snip ...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin