bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nullglob option breaks complex parameter expansion/deletion


From: Michael Wardle
Subject: Re: nullglob option breaks complex parameter expansion/deletion
Date: Sat, 02 Jul 2005 11:43:06 +1000

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]