cc: [email protected]
Subject: Re: Re: [ast-users] ksh read byte
--------
> Many thanks! With a couple of tweaks, I got what I wanted:
>
> while read -r -N1 B
> do
> printf "%02X " ${B:+"'$B'"}
> done < hexfile | less
>
> That works for 0..255 on both locales "C" and "en_ZA.utf8". The ":"
> before the "+" proved essential. Is operation for inputs 128-255 a
> fluke which may change with ksh version?
>
> Bob Barry
>
The reason that inputs 128-255 don't work is that these are not characters
in the C locale. With the POSIX locale, they should work, because I believe
that they define each byte as a character.
David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users