Re:The Beauty of Unix Pipelines
by tsimionescu on Friday June 05, 2020 @12:27PM
(#23430322)
Does every unix utility suport -print0 or similar?
My point wasn't specifically about find, but about the problems of text and other unstructured input/output in general.
Update: reading a bit around the internet, it looks like it's not possible to do something like this :
find / -print0 | \
grep something | \
xargs -0 cat
As grep will mangle the output from find -print0.
Pipelines to the rescue. If you used a pipeline instead of shell expansion, it can deal with spaces just peachy.
There's no argument that bash (and other shells) make dealing with spaces and quotes troublesome. That has nothing to do with pipelines.