Imagine that input pipe is a list of words like "foo", "bar"
in CSV format.
And then there's this file or something and I'd like to test whether it contains "foo"
(1) or "bar"
(2) so something like:
echo "foo\nbar" | grep input.txt $0
and I'd like to get merged result of these 2 grep operations in the output:
grep "foo" input.txt
grep "bar" input.txt
Example:
input.txt = "foo1\nfoo2n\bar\n123"
output = "foo1\nfoo2n\bar\n"
I don't care how many times it runs if it does search for all the arguments.