Subject: Re: echo weirdness
To: None <current-users@NetBSD.org>
From: Jukka Salmi <jukka-netbsd@2003.salmi.ch>
List: current-users
Date: 02/18/2004 15:26:15
Hi,
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)
HTH, Jukka
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~