|
nawk help
What am I doing wrong here? I get syntax error.
I am trying to parse a file looking for the lines with "running" as the first field then print the 5th field, then looking at the 9th field for specific values and writing the whole line to a junk file.
nawk ';
{if ($1 == "running") print $1 >> ./junk1;
if ($9 == "S73isid") {print $0} >> ./junk1;
if ($9 == "S750vxpal.gridnode") {print $0} >> ./junk1;
if ($9 == "S75vxpal.StorageAgent") {print $0} >> ./junk1;
if ($9 == "S75vxsmfd") {print $0} >> ./junk1;
if ($9 == "S760vxpal.actionagent") {print $0} >> ./junk1;
print}' rc2.d_listing
Thanks!!
|