Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] bash and grep and diff
- Date: Tue, 10 Aug 2010 20:43:31 +0900
- From: Romeo Theriault <romeo.theriault@example.com>
- Subject: Re: [tlug] bash and grep and diff
- References: <4C6137CE.2080100@example.com>
On Tue, Aug 10, 2010 at 20:28, Darren Cook <darren@example.com> wrote:--I often want to run diff on just a subset of two files. I.e.
grep "ABC" a.txt >tmp1.txt
grep "ABC" b.txt >tmp2.txt
diff tmp1.txt tmp2.txt
Is there a way to do that in a single line, without having to create
temp files? (From a bash commandline, if at all possible.) (There is
only one stdin pipe, so I'm guessing not, but thought it wouldn't hurt
to ask...)Does this meet your criteria?diff <(grep "ABC" a.txt) <(grep "ABC" b.txt)Wish I could take credit but was found here:
Romeo Theriault
- References:
- [tlug] bash and grep and diff
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] bash and grep and diff
- Next by Date: Re: [tlug] bash and grep and diff
- Previous by thread: Re: [tlug] bash and grep and diff
- Next by thread: Re: [tlug] bash and grep and diff
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links