3 ms·
Ah, more problems with shell expansion and substitution. Pipelines to the rescue. If you used a pipeline instead of shell expansion, it can deal with spaces ju
by bregma 6y ago
Ah, more problems with shell expansion and substitution.
Pipelines to the rescue. If you used a pipeline instead of shell expansion, it can deal with spaces just peachy.
$ find . -name "*abc*" -print0 | xargs -0 ls -l
There's no argument that bash (and other shells) make dealing with spaces and quotes troublesome. That has nothing to do with pipelines.
- jcranmer 6y agoAnd note that, all the way in my original argument, I complained that every command used a different way of spelling that changed delimiter character.
- tsimionescu 6y agoDoes 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.