Metric Extension - Host command with an if statement
I'm trying to create a Metric Extension to test for the installation of a product on each host target.
There are five input lines on the Adapter page:
Command
Script
Arguments
Delimiter
Starts With
Syntax when run in a shell script looks like this:
if [ -d /etc/something ]; then
echo "Yes"
else
echo "No"
fi
Host metric extension wizard allows one line in the required Command field and 'if' statements like this don't work on one line.
Syntax like this works on one line on the command line:
[ /etc/something ] && echo "Yes"; [ ! /etc/something ] && echo "No";
But OEM complains that
0