Silly me...i work on Win XP, MSDOS cmd shell with Gawk3.1.3
Tried your hint to work on cygwin and it works!(with your command: gawk '{sub(/,/,".")}1' 1.txt > 2.txt) What puzzle me is why is there a need for the extra 1 after }?
Will work on the other problem.
Thanks to both of you!
Hi PHV
1.
- gawk '{sub(/,/,".")}' 1.txt > 2.txt
gawk: cmd. line:1: ^ invalid char ''' in expression
Somehow my system doesnt allow me to use '.
- gawk '{sub(/,/,".")}' 1.txt > 2.txt
gawk: cmd. line:1:^ syntax error
gawk: cmd. line:1: fatal: 0 is invalid as number of arguments for sub
2. I...
Hi
I'm trying to
1. Replace a comma with a full stop. Tried using
gawk "sub(/,/,.)" 1.txt > 2.txt (failed)
gawk "sub(/,/,test)" 1.txt > 2.txt (it only delete away the comma but it doesn't replace it with test)
When I put numbers as replacement text, it works though.
Can anyone assist?
2...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.