4 ms·
You seem to have very similar races here though? Perfectly possible, even likely, for a process to end between "find" finding it and awk opening it... especial
by TristanBall 3y ago
You seem to have very similar races here though?
Perfectly possible, even likely, for a process to end between "find" finding it and awk opening it... especially given the pipe buffer between the two.
Personly I'd rather an "expect errors" approach.. break it out so that you can easily treat a failed open as a "continue next" scenario and hide just those errors
- mzs 3y ago2>&- hides races in find itself while ((getline li < $0) > 0) hides races in awk in practice Name: is the first line so cmd is not truncated Of course I got my test wrong though :D $ time ./dumbps 0 >/dev/null real 0m0.030s user 0m0.012s sys 0m0.022s