Hi,
I've searched this site and the wider web and have not found anything (that I can understand..) that helps me.
I've used shell commands in awk fine in the past, the difference is that I want to pass the shell command a field variable within awk from the current input.
A simple example I'm struggling to get working is below:
echo rpm|awk '{"rpm -qc " $1 "|grep etc|getline configfile;print configfile}'
The error I get is:
awk: {"rpm -qc " $1 "|grep etc|getline configfile;print configfile}
awk: ^ unterminated string
-bash: echo: write error: Broken pipe
I'm using this noddy example just so I can understand how it works before I look at using it properly.
Any guidance would be much appreciated.