Reputation: 3452
I would like to compare 2 file and show the difference between files
when I use the following :
exec sh -c "diff -w file1 file2 \|grep \<"
but no result is shown and the script is brokeen
what's wrong with the tcl command ?
Upvotes: 1
Views: 1824
Reputation: 5763
The following will work:
puts [exec sh -c "diff -w file1 file2 |grep \\<"]
The < needs to be double-backslashed, and the output should be printed.
Upvotes: 3