4 ms·
> just don't use xargs the whole point of my example was to show how easy parallelism is. You create a list of tasks, then you pipe the list to xargs or gnu p
by enriquto 7y ago
> just don't use xargs
the whole point of my example was to show how easy parallelism is. You create a list of tasks, then you pipe the list to xargs or gnu parallel.
- jstimpfle 7y agoYou can't write ASCII NUL characters from portable shell, that's why this task cannot be done correctly (for all possible filenames) from shell. You need to use tools like find(1) So, no, it's not easy, at least not if you want to handle all cases without wreaking havoc.
- chubot 7y agoPractically speaking, you can write NUL from shell because bash is everywhere, busybox ash emulates a lot of bash, etc. However I won't claim it's pretty or easy for people to use, so the point of Oil is basically to clean up patterns like this, e.g. find -print0 | xargs -0 and more. This post uses a related problem and solution as design motivation for Oil: How to Quickly and Correctly Generate a Git Log in HTML http://www.oilshell.org/blog/2017/09/19.html http://www.oilshell.org/blog/2017/09/19.html