bug-bash
[Top][All Lists]
Advanced

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

Re: `$x` adds single quotes during interpolation under Wrong Circumstanc


From: philo vivero
Subject: Re: `$x` adds single quotes during interpolation under Wrong Circumstances
Date: Fri, 02 Apr 2004 09:39:04 -0800

On Fri, 2004-04-02 at 07:14, Paul Jarc wrote:
> philo vivero <phiviv@hacklab.net> wrote:
> > How can I make "echo $a" return "*.log*" if there is a file called
> > "install.log.syslog" in the cwd?
> 
> echo "$a"

echo "$a" != echo $a -- this is not pedantic.

It makes a particular function impossible to write (of course I could do
kludgery by changing CWD to some directory that I know doesn't contain
certain files, but I hope you don't recommend this).

I'm hoping you can tell me that there's a good reason that this:

a=\*.log\*
echo $a

does a double-expansion. First $a is expanded out to "*.log*" *THEN*
that is further expanded to install.log.syslog. If this is a
feature-not-a-bug I really don't mind dropping this issue. But I still
feel it's a bug. Would you accept a patch?

-- 
pv





reply via email to

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