arravalli12
Programmer
Hi,
I am trying to execute this script...but I am getting an error saying:
startinformsh_fw.ksh: line 38: syntax error: unexpected end of file
I am pasting the script here:
Could anyone suggest where is the mistake?
Thanks
I am trying to execute this script...but I am getting an error saying:
startinformsh_fw.ksh: line 38: syntax error: unexpected end of file
I am pasting the script here:
Code:
#!/bin/ksh
if [ "$#" != "3" ]
then
echo "Usage: $0 <file_name> <poll_interval_in_sec> <minimum size in bytes>"
exit 1
fi
FILE_NAME=$1
POLL_INTERVAL=$2
SIZE=$3
found=0
while {"$found" != "1"}
{
x = 'find . -name "$FILE_NAME"'
if ["$x" != ']
then
FILESIZE_PREVITER='ls -l "$FILE_NAME"|awk '{print $5}'
sleep $POLL_INTERVAL
FILESIZE_CURRITER='ls -l "$FILE_NAME"|awk '{print $5}'
if ["$FILESIZE_PREVITER" eq "FILESIZE_CURRITER" && "FILESIZE_CURRITER" ge "$SIZE"]
then
echo 'Successful'|/usr/lib/sendmail -t shp15@test.com
$found=1
#echo "Hello"
exit 0
fi
fi
sleep $POLL_INTERVAL
continue
}
Could anyone suggest where is the mistake?
Thanks