bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61664] Messy output using xargs -P


From: Bernhard Voelker
Subject: [bug #61664] Messy output using xargs -P
Date: Mon, 13 Dec 2021 19:12:54 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]