linux – Newline-separated xargs – Server Fault
Posted by jpluimers on 2023/03/07
A long time ago, on just one system, I forgot which one, I needed explicit [Wayback/Archive] linux – Newline-separated xargs – Server Fault.
The simple solution was to replace the newline with null before running xargs:
tr '\n' '\0'
The clean solution was to install [Wayback/Archive] gnu xargs:
GNU xargs (default on Linux; install
findutilsfrom MacPorts on OS X to get it) supports [Wayback/Archive]-dwhich lets you specify a custom delimiter for input, so you can dols *foo | xargs -d '\n' -P4 foo
–jeroen






Leave a comment