I would like to have the echo
command executed when cat /etc/passwd | grep "sysa"
is not true.
What am I doing wrong?
if ! [ $(cat /etc/passwd | grep "sysa") ]; then
echo "ERROR - The user sysa could not be looked up"
exit 2
fi
I would like to have the echo
command executed when cat /etc/passwd | grep "sysa"
is not true.
What am I doing wrong?
if ! [ $(cat /etc/passwd | grep "sysa") ]; then
echo "ERROR - The user sysa could not be looked up"
exit 2
fi