Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

GNU parallel -X equivalent parameter(s) #73

Open
hongxuchen opened this issue Sep 27, 2018 · 3 comments
Open

GNU parallel -X equivalent parameter(s) #73

hongxuchen opened this issue Sep 27, 2018 · 3 comments

Comments

@hongxuchen
Copy link

When using parallel with grep/ripgrep, without particular options, neither this parallel nor GNU parallel will display the file name (xargs works well). But GNU parallel has an -X that can solve this issue. How can I achieve with this parallel's command line?

2018-09-27-204342_1919x856_scrot

BTW, when using xargs with ripgrep, the matched patterns can still be highlighted automatically (--color=auto); while neither GNU parallel nor this parallel can keep the highlighting.

@ole-tange
Copy link

ole-tange commented Oct 1, 2018

With GNU Parallel try:

parallel --tty grep --color=auto -H foo ::: *

It should keep the highlighting and the file name.

@hongxuchen
Copy link
Author

hongxuchen commented Oct 1, 2018

@ole-tange it works for GNU parallel (find -name "*.rs" | /usr/bin/parallel --tty grep --color=auto -H _init) in terms of coloring matched. Any idea for this Rust parallel command?

@hongxuchen
Copy link
Author

@ole-tange Sorry I just noticed you're the author of GNU parallel 😺

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants