how would I get the output of this to be in an a .html file..I tried putting the echo >> command on each line to send it to a file called out.html but doesn't come out ..do i need to put the html header at top?
#!/bin/bash
dans=`netstat -an | grep 127.0.0.1.8883 | awk '{print $4}' | grep 127.0.0.1.8883`
if [ "$dans" = "127.0.0.1.8883" ]; then
echo "Dansguardian" "[ OK ]"
else
echo "Dansguardian" "[ DOWN ]"
fi
squid=`netstat -an | grep 127.0.0.1.3338 | awk '{print $4}' |grep 127.0.0.1.3338`
if [ "$squid" = "127.0.0.1.3338" ] ; then
echo -e Squid "\t\t" "[ OK ]"
else
echo -e Squid "[ DOWN ]"
fi
#!/bin/bash
dans=`netstat -an | grep 127.0.0.1.8883 | awk '{print $4}' | grep 127.0.0.1.8883`
if [ "$dans" = "127.0.0.1.8883" ]; then
echo "Dansguardian" "[ OK ]"
else
echo "Dansguardian" "[ DOWN ]"
fi
squid=`netstat -an | grep 127.0.0.1.3338 | awk '{print $4}' |grep 127.0.0.1.3338`
if [ "$squid" = "127.0.0.1.3338" ] ; then
echo -e Squid "\t\t" "[ OK ]"
else
echo -e Squid "[ DOWN ]"
fi