On Sep 15 18:30, Lee wrote: > 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 > awk ' > BEGIN { > s="Serial0" > gsub("[a-z]","",s) > printf("s= ::%s:: should = ::S0::\n", s) > exit > } ' > > > I also tried it with IGNORECASE=0 and with "awk --traditional" - same results. > > $ which awk > /usr/bin/awk > > $ awk --version > GNU Awk 3.1.8
Works fine for me: $ uname -a CYGWIN_NT-6.1 vmbert7 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin $ gawk --version GNU Awk 3.1.8 Copyright (C) 1989, 1991-2010 Free Software Foundation. [...] $ sh //calimero/corinna/test.awk s= ::S0:: should = ::S0:: $ Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple