Subject: Re: echo weirdness
To: None <current-users@NetBSD.org>
From: Jukka Salmi <firstname.lastname@example.org>
Date: 02/18/2004 15:26:15
Patrick Welche --> current-users (2004-02-18 13:55:07 +0000):
> There I was surpised that printf "%c" 65 gets me 6, not A, but it is
> what it says in the man page.. any idea how to do int <-> char conversion
> in a script?
for int -> char conversions you could use
printf '%b' '\101'
(at least with sh, ksh and bash)
$ ((RANDOM%6)) || rm -rf ~