[CALUG] Best programming app

Josiah Ritchie josiah.ritchie at gmail.com
Wed Nov 23 08:44:26 CST 2005

On 11/22/05, Jim Bauer <jfbauer at comcast.net> wrote:
> Try something like this...
> $ diff <(sort first.csv) <(sort second.csv) | egrep '(^>|^<)' | sort > diffs
> For the <(cmd) syntax see 'Process Substitution' in the bash manpage.
> Basically the <(cmd) will be replaced with a file name that diff will
> see.  The output from the cmd will be written to that file (a pipe).
> To see what is going on try these.
> $ echo <(date)
> /dev/fd/63
> $ cat <(date)
> Tue Nov 22 20:36:43 EST 2005

Thanks Jim. That's great! I always enjoy these type of discussions. It
brings these types of powerful little tools into view.

I notice you're using egrep instead of grep. I need to get used to
thinking of that also.


More information about the lug mailing list