Neophyte awk question(s)

Henry Spencer henry at utzoo.UUCP
Fri Sep 28 03:32:48 AEST 1984


> use something like:  printf "%c", 1.  However, this is often awkward.

Hm, one learns something every day.  How embarrassing, since my posting
to the net on the subject said it couldn't be done...

On inspection of the code, awk's %c takes the argument as a number (if
possible, otherwise you get nothing printed), converts it to an int, and
feeds that to the C %c.  By accident, the experiments I did with %c all
ran afoul of the value not being a number.

My general comment "awk is not C" stands, however.  Try using %u and
you'll see what I mean...
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.unix mailing list