On 19. feb 2005, at 6:28, Allan Odgaard wrote:
On Feb 18, 2005, at 20:18, Eric Hsu wrote:
- In my setup, a command of
echo $TM_SELECTED_FILES | xargs diff -u
works but
diff -u $TM_SELECTED_FILES
does not. I get a "diff: file not found" error.
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.