Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* AWK on digital UNIX.
@ 1997-03-05  5:00 rchannav
  1997-03-06  5:00 ` Mark Katz
  1997-03-07  5:00 ` Pete Ford
  0 siblings, 2 replies; 4+ messages in thread
From: rchannav @ 1997-03-05  5:00 UTC (permalink / raw)



Hi All,

Recently I had to write a script in awk on DIGITAL - UNIX 4.0.
I was surprised by this ambiguous output and see if it is the
way in DIGITAL UNIX.  The code segment is as follows

awk -F\, '{
		.......

		gsub(/ /,//,$2)
		print $0

		.......
	}' < /tmp/tmp.txt

the tmp.txt is like this

hello,fo o,123
foo,bar,123
bar,ba r,123 etc.,

Basically I am stripping the blanks from second field.  The output it
produces is in the following format

hello,fo10,123
foo,bar,123
bar,ba1r,123

I know that gsub returns the no.of occurences, but why in $2??

Thanks

-- 
--------------------------------------------------------
You might be a redneck if you think I speak for NCR
--------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-03-07  5:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-03-05  5:00 AWK on digital UNIX rchannav
1997-03-06  5:00 ` Mark Katz
1997-03-06  5:00   ` Mark Katz
1997-03-07  5:00 ` Pete Ford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox