Combining xargs with cat and grep
I want to take the output from a file and feed it in as arguments for a grep command on the same file that I want to execute against:
:~$ cat example
cat
dog
mouse
ant
:~$ cat example | xargs cat example | grep
Usage: grep [OPTION]… PAT…