> I also noticed in the POSIX standard that quoting the word part should > cause it to be literal and prevent globbing. If I try this in bash, I > get the same result as in my original message, that is: > > $ shopt -s nullglob > $ connectioninfo='${HOST%%".*"} ${USER}' > $ echo $connectioninfo > ${USER}
Actually, this seems similar to the following: $ shopt -s nullglob $ echo $USER michael $ var='${USER}".*"' $ typeset -p var declare -- var="\${USER}\".*\"" $ echo $var $ echo "$var" ${USER}".*" $ eval echo "$var" michael.* It looks like a bare $var is being expanded multiple times in a way that I don't understand, but perhaps that is just the nature of shell. _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash