-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=18347 $?=0] ; cat foo.awk
#!/bin/awk -f
BEGIN {
for (ii = 0; ii 256; ++ii) {
ch = sprintf("%c", ii);
ascii[ch] = ii;
}
for (ii = 1; ii ARGC; ii++) {
print "ord(" ARGV[ii] " = " ascii[ARGV[ii]];
}
}
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=18347 $?=0] ; ./foo.awk a b c 1 2 3
ord(a) = 97
ord(b) = 98
ord(c) = 99
ord(1) = 49
ord(2) = 50
ord(3) = 51
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=18347 $?=0] ; bye