Well, I think you can find dozens of questions on this platform how to pipe
find output to
sed, but I haven't found anything for the reverse direction so far. What I want to do is modify my input, and then pass it to
Supposing I want to do something like the following, in order to make life easier for myself by avoiding to type in those cumbersome asterisk wildcards. (I hope it's obvious enough that the expression which follows the here-string operator
<<< is eventually planned to get replaced by a parameter, e. g.
$1, in a script later. The line below is merely for demonstration.)
$ sed 's/ /\*/g' <<< ' foo bar baz ' | find . -type f -iname -
- at the end of this one-liner was actually supposed to use the output of
sed as input for
find; however, extending the
find part to
... find -D tree . -type f -iname - ...
revealed that the parameter was not passed to
find. Perhaps you cannot pass pre-processed input to
find using a pipe at all?