Vin Shelton writes:
On 5/3/07, Stephen J. Turnbull <stephen(a)xemacs.org> wrote:
> We should fix the quoting problem, though, since it's
trivial to do
> so. At least the Bash man page specifies the argument to -c as "a
> string", so it needs quotes if it contains spaces.
Here's why I asked exactly what went wrong:
bash-3.2$ mkdir "foo bar"
Spaces in the path returned is not my point. As you point out,
dealing with them would take auditing the whole script, and possibly
can't be done. The point is that
sh -c cd $src && pwd
means
if sh -c cd $src; then
pwd
fi
which clearly is not the same as
sh -c "cd $src && pwd"
(although a little thought suggests that in that context it's actually
equivalent!)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta