Quantcast
Channel: User ozzy - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 31

Answer by ozzy for Can't run parallel zgrep with regex

$
0
0

If you are using the parallel command from the moreutils package, your command could be simplified like this:

parallel zgrep -e "\(text1\|text2\).*Exception" -- my.log*.gz

This will run parallel instances of zgrep, one for each file matching the shell pattern my.log*.gz. Note that the pattern is expanded by the shell before the command is executed. Hence there is no need for a separate invocation of find.


Viewing all articles
Browse latest Browse all 31

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>