Hi Chet

Thanks for your very prompt reply.

I understand that globbing is happening, but I don't understand why
deleting a parameter should occur with nullglob set if the parameter
matches but the word to delete doesn't.  The bash behavior seems to make
this construct useful only for file name deletion if nullglob is set,
when it seems to be useful for any substring deletion if nullglob is
unset.

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}

I think $connectioninfo should remain unchanged due to the word being
quoted, and wonder if bash supports this quoting syntax.




_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to