You are using a variable '$MATCHING' that doesn't seem to be initialized anywhere. Do you really mean to use
Code:
#!/bin/sh
FILE="/home/checkfile"
ORIGCHECK="1712885500"
temp=`cksum $FILE | cut -f 1 -d ' '`
echo $temp
if [ $temp = $ORIGCHECK ]
then
echo "Checksums are matching"
else
echo "Checksums NOT matching"
fi
This is not nearly complete enough to be a CGI. There is no output of HTTP headers, or any HTML.
You give the classic 'it doesn't work' description of the fault. Can you add a whole bunch of detail to that?
--- rod.