#!/bin/bash
if ping -c 1 hostfoo > /dev/null
then
echo "ping success"
else
echo "could not ping hostfoo. exiting..."
fi
#!/bin/bash
if ping -c 1 hostfoo > /dev/null
then
echo "ping success"
else
echo "could not ping hostfoo. exiting..."
fi
Leave a comment