[lug] bash scripting question
Jeffrey Haemer
jeffrey.haemer at gmail.com
Thu Oct 7 17:13:25 MDT 2010
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]
פרייהייט? דאס איז יאַנג דינען וואָרט.
*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20101007/f74e3a49/attachment.html>
More information about the LUG
mailing list