Try to evaluate input data suing awk
Hello,
I am trying to evalute input data using awk: For example
cat /etc/ssh/sshd_config | grep IgnoreRhosts | awk '{print $1,$2}' | awk '{print} END {if ($1 == "#IgnoreRhosts yes") {print "failure"}} then {if ($1 == "IgnoreRhosts yes") {print "compliant"} else {print "failure"}}' Unfortunately this does not seem to be working. Any ideas?
Thanks in Advance!
|