Re: `$x` adds single quotes during interpolation under Wrong Circumstanc
From:
Chet Ramey
Subject:
Re: `$x` adds single quotes during interpolation under Wrong Circumstances
Date:
Thu, 1 Apr 2004 08:40:35 -0500
> Machine Type: i586-mandrake-linux-gnu
>
> Bash Version: 2.05b
> Patch Level: 0
> Release Status: release
>
>
> Description:
> Doing `$x` will add single-quotes sometimes -- but not always.
> It won't add single-quotes if $x doesn't contain escaped
> characters. This makes it impossible in some shell scripts to
> get desired/intended behaviour and in any case seems backwards.
> If the author has bothered to escape things, he should be able
> to undestand how to do multiple escapes for multiple
> interpolations.
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.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/