[lug] bash scripting question

Chip Atkinson chip at pupman.com
Thu Oct 7 18:01:49 MDT 2010


Thanks!  That was definitely it.  I tried
paste <$(ls) <$(ls /tmp)

but google doesn't help much with punctuation.

On Thu, 7 Oct 2010, Jeffrey Haemer wrote:

> Chip,
> 
> diff <(grep abc file1) <(grep abc file2)
> 
> You want to google for for "process substitution" .
> 
> HTH!
> 
> On Thu, Oct 7, 2010 at 5:08 PM, Chip Atkinson <chip at pupman.com> wrote:
> 
> > Greetings,
> >
> > I'm trying to remember how to use the output of two commands without using
> > temp files.  Say for example that I wanted to grep two different files and
> > then diff the output of the greps.
> > With temp files it would be
> >
> > grep abc file1 > /tmp/f1
> > grep abc file2 > /tmp/f2
> > diff /tmp/f1 /tmp/f2
> >
> > I know I've seen it done before but I don't know even the google terms.
> >
> > Thanks in advance.
> > Chip
> >
> >
> >
> > _______________________________________________
> > Web Page:  http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> > Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
> >
> 
> 
> 
> -- 
> Jeffrey Haemer <jeffrey.haemer at gmail.com>
> 720-837-8908 [cell], http://seejeffrun.blogspot.com [blog],
> http://www.youtube.com/user/goyishekop [vlog]
> פרייהייט? דאס איז יאַנג דינען וואָרט.
> *
> *
> 




More information about the LUG mailing list