Bash-1.14.4 has a bug with variable name expansion. On my SCO Unix 3.2v4.0 system, this script fails with bash-1.14.4, but works with bash-1.14.3, bash-1.13.1, /bin/sh and /bin/ksh. William Bader work: 610-837-8485 home: 610-868-1311 email: wbader@pluto.csee.lehigh.edu, william@nscs.fast.net note: replies to wbader@csee.lehigh.edu without pluto sometimes bounce ------------------------------------------------------------ tool_var() { eval $1=\"\${$1:-$2}\" export $1 } A="aaa bbb ccc" unset B tool_var B ${B:-"$A"} echo "Result is $B" if [ "$A" = "$B" ] then echo "OK" else echo "Error, expected $A" fi