I\'m having a problem with a shell script (POSIX shell under HP-UX, FWIW). I have a function called print_arg into which I\'m passing the name of a parameter as $1. Given
In bash (but not in other sh implementations), indirection is done by: ${!arg}
${!arg}
foo=bar bar=baz echo $foo echo ${!foo}
bar baz