if grep -q 'mywarning' /etc/motd; then
echo " Banners created"
else echo "Banners not created"
echo " Details: $(/bin/ls -l /etc/motd)"
fi
Quais são os comandos necessários para executar um script que mostra que os banners de aviso foram criados com if else statement?
Por exemplo:
If [something == something]
echo " Banners created"
else
echo "Banners not created"
echo " Details: "
echo $( /bin/ls -l /etc/motd)
if grep -q 'mywarning' /etc/motd; then
echo " Banners created"
else echo "Banners not created"
echo " Details: $(/bin/ls -l /etc/motd)"
fi
Tags banner shell-script