3 ms·
> Also, small nit, "find ./place-for-pipers -type f -name "piper" | xargs grep -i 'piping'" wasn't accepted due to the filenames being prefixed to the output. I
by zoidb 6y ago
> Also, small nit, "find ./place-for-pipers -type f -name "piper" | xargs grep -i 'piping'" wasn't accepted due to the filenames being prefixed to the output. I feel like this is one of the benefits of piping it all through a single grep (grep, knowing the context of multiple input files, gives you useful output). Obviously you can massage both solutions to give the others' text output, but I just felt a little cheated that my response wasn't marked correct.
Hm, yeah we can probably just search for the filenames and ignore everything else to make it a little more forgiving.
- ecliptik 6y agoyou can add -h to grep, which won't print the filenames (this is what I did an it accepted the answer).