//View Tip #45
Similar Tips
» ssh proxy forwarding
» Change extension of files in the current directory
» Filter stderr for cron jobs
» SVN resolve all conflicts
» vimdiff and svn

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
multiple command output into a single program:

diff -u <(ls -c1 dir_1) <(ls -c1 dir_2)

Will show you a diff of files in the root of dir_1 and dir_2


View Comments »




Comments 

Add your comment

Comments are currently disabled
CMG
Thanks, this was very useful. I've been looking for a way of taking stdin for generating diffs (e.g. copying & pasting from different sources) in vimdiff (though this should be applicable elsewhere too). I found putting a dummy command (i.e. one with no output) in the parenthesis to be the best solution...

$ vimdiff <(echo) <(cat /dev/null)

Proceed to paste whatever you want to compare into the two panes..
Posted 2009-03-10 12:35:30
George Avasar
in ls -c1, what is the purpose of the one "1"?
If you want it ordered by ctime, why not just -c?
Posted 2010-09-19 11:40:40

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit