Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. hippo12

    sub function

    Thanks!
  2. hippo12

    sub function

    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!
  3. hippo12

    sub function

    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...
  4. hippo12

    sub function

    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...

Part and Inventory Search

Back
Top