[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: output of parallel pipe to another grep
From: |
Ole Tange |
Subject: |
Re: output of parallel pipe to another grep |
Date: |
Thu, 20 Apr 2017 19:35:26 +0200 |
On Thu, Apr 20, 2017 at 3:24 AM, Asif Iqbal <vadud3@gmail.com> wrote:
> Hi I have multiple compressed files that I need to run grep against.
>
> I am trying to find 'foo', 'bar' and '192.168.1.100' against all the
> compressed log files.
>
> This will work?
>
> ls 201612*.gz | parallel zgrep foo {} | grep bar | grep 192.168.1.100
Yes. It may be faster to move all the greps into parallel:
ls 201612*.gz | parallel 'zgrep foo {} | grep bar | grep 192.168.1.100'
> Thanks for such an awsome tool!
If you like GNU parallel:
* (Re-)walk through the tutorial if you have not done so in the past
year (http://www.gnu.org/software/parallel/parallel_tutorial.html)
* Give a demo at your local user group/your team/your colleagues
* Post the intro videos and the tutorial on Reddit, Diaspora*, forums,
blogs, Identi.ca, Google+, Twitter, Facebook, Linkedin, and mailing
lists
* Request or write a review for your favourite blog or magazine
(especially if you do something cool with GNU parallel)
* Invite me for your next conference
If you use GNU parallel for research:
* Please cite GNU parallel in you publications (use --citation)
If GNU parallel saves you money:
* (Have your company) donate to FSF or become a member
https://my.fsf.org/donate/
/Ole