Skip to main content

Timeline for answer to Calling shell functions with xargs by Eremite

Current License: CC BY-SA 3.0

Post Revisions

3 events
when toggle format what by license comment
Oct 20, 2021 at 16:18 comment added EndlosSchleife In general, this would break on shell special characters (e.g. |, #) and ignore white space in input. Instead of letting bash treat the input as code, I suggest letting xargs pass them as-is. echo {1..10} | xargs -n 1 -P4 bash -c "$(declare -f testing);"' testing "$@"; echo "$@";' argv0
Sep 10, 2016 at 10:49 history edited Ciro Santilli OurBigBook.com CC BY-SA 3.0
it's never too late
Jun 22, 2016 at 11:56 history answered Eremite CC BY-SA 3.0