|
|
|
|
|
by cb321
1533 days ago
|
|
You are just moving goalposts from "grep -l" to "grep t". The "grep -l" should be reliable by virtue of line buffering and Linux kernel source path names being shorter than PIPE_BUF (which yes, you do have to know|check - much less to know than a >5000 line man page). While I could address the moved goalposts, I already mentioned xargs --process-slot-var [1] elsethread and, in my experience, goalpost movers are never satisfied. [1] https://unix.stackexchange.com/questions/449224/how-can-i-ge... |
|
Wow. Just wow.
I thought you were trying to show a general way to run jobs in parallel in a safe, reliable way that was faster than GNU Parallel.
You failed to do that.
Instead you showed that it is possible to run jobs faster than GNU Parallel, but in a way that is neither safe nor reliable.
(Or more correctly: If you know the exact limitations of the kernel of the OS you are currently using, it will be reliable in certain situations - but not in general).
I will pick reliable results over speed any day, thank you.
I hope the person, who mentioned safe parallel grep, will show how it is done: https://news.ycombinator.com/item?id=30891634 because I will definitely not be using your solution.