[bug #61664] Messy output using xargs -P

Bernhard Voelker <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #2, bug #61664 (project findutils):

P.S. One way to ensure that the launched processes are using different
resources is by passing the --process-slot-var=N option.

P.P.S. Furthermore, your example could avoid spawning so many grep(1)
processes (and therefore processing the input file again and again) by
passing
the patterns as input via -f (depending on the real size of
'param-list.txt'):

xargs -I '{}' echo '^https?://(([[:alnum:][:punct:]]+)+)?{}=' <
./params-list.txt \
  | grep -oiEf - ./filtered_fetched_list.txt \
  | sort -u

or simpler:

sed 's|^|^https?://(([[:alnum:][:punct:]]+)+)?|; s|$|=|' < ./params-list.txt
\
  | grep -oiEf - ./filtered_fetched_list.txt \
  | sort -u


I'll leave it as homework to the reader to find the combination
of both by e.g. passing <500 patterns to each grep process. ;-)

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61664>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.