On Feb 19, 2005, at 14:31, Sune Foldager wrote:
I think the problem is that the shell passes the variable as a single argument to diff. So basically in #2 it calls: diff -u "'file1' 'file2'". I am however not entirely sure about this.
Sounds odd. Even if I do stuff like A='"foo bar"' ls $A I get "foo not found, bar" not found. I don't think it passes it as a single argument.
Nah, seems the quotes are the problem:
% tst () { echo $1; } % foo="'this' 'is' 'a' 'test'" % tst $foo 'this'