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 02:02:49 -0800

> There is no bug here.  The single quotes in question are added by the
> tracing code enabled by `set -x', so that output may be more easily
> reused as input. 

Allow me to rephrase.

How can I make "echo $a" return "*.log*" if there is a file called
"install.log.syslog" in the cwd?

:) touch install.log.syslog
:) a=*.log*
:) echo $a
install.log.syslog                # sensible
:) a=\*.log\*
:) echo $a
install.log.syslog                # !!!!!!!!!!!!!!!!!!!!!
:) a='*.log*'
:) echo $a
install.log.syslog                # !!!!!!!!!!!!!!!!!!!!!
:) a=\\\*.log\\\*
:) echo $a
\*.log\*                         # sensible
:) a=\\*.log\\*
:) echo $a
\*.log\*                         # sensible
:) bash --version
GNU bash, version 2.05b.0(1)-release (i586-mandrake-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

-- 
pv





reply via email to

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