I'm piping the output of a command to awk and i want to check if that output has a match in the lines of a file.
Let's say i have the following file:
aaa
bbb
ccc
...etc
Then, let's say i have a command 'anything' that returns, my goal is to pipe anything | awk
to check if the output of that command has a match inside the file (if it doesn't, i would like to append it to the file, but that's not difficult..). My problem is that i don't know how to read from both the command output and the file at the same time.
Any advice is welcome