I run an automatic counter on my FreeBSD server, my current scripts did work properly in Gentoo Linux. They do not work in FreeBSD, I get the following error.
This I need to fix. Here is the code for the script in question.
I also got same script for a second counter that I am running. I can adopt this script to that counter with no issues, since they are both doing the same thing, just in different part of the world.
Thanks for the help.
Code:
./eq.imo.sh
URL=http://hraun.vedur.is/ja/englishweb/eqlist.html: Command not found.
TODAYSDATE=2013-05-09: Command not found.
URL: Undefined variable.
COUNT=: Command not found.
COUNT: Undefined variable.
This I need to fix. Here is the code for the script in question.
Code:
#earthquake count shell V0.0.1
#!/bin/bash
URL="http://hraun.vedur.is/ja/englishweb/eqlist.html"
TODAYSDATE=`date +%Y-%m-%d`
#TODAYSDATE=`date +%Y/%m/%d`
#TODAYSDATE=`date +%Y-%m-%d`
COUNT=`lynx -dump ${URL} | grep ${TODAYSDATE} | grep -vi updated | wc -l`
#COUNT=`wget -O ${URL} | grep ${TODAYSDATE} | grep -vi updated | wc -l`
echo ${COUNT}
echo ${COUNT}
#echo ${COUNT}
#echo "uptime"
#echo "hostname"
exit 0
I also got same script for a second counter that I am running. I can adopt this script to that counter with no issues, since they are both doing the same thing, just in different part of the world.
Thanks for the help.