01-23-07 06:23 PM
2007-01-23, 18:04(+01), Martin Klar:
> Hi NG,
>
> I need a script which translates
> a character, e.g. A to its ascii-value (65).
> The script has to cope with A-Z.
>
> Thank you for your answers.
[...]
printf '%d\n' "'A"
also with zsh:
print $((##A))
or:
var=A
print $((#var))
--
Stéphane
[ Post a follow-up to this message ]
|