I was wondering how do I get awk to take a string from the pipe output and a file?
I\'ve basically have a chain of commands that eventually will spit out a string.
As Karoly suggests,
str=$( rest of commands that will give a string ) awk -v s="$str" -F, '$7==s {print $5; exit}' file
If you want to feed awk with a pipe:
cmds | awk -F, 'NR==FNR {str=$0; next}; $7==str {print $5}' - file
I think the first option is more readable.