Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This script errors, cannot see why 2

Status
Not open for further replies.
Nov 24, 2004
159
GB
#!/bin/sh
#Script to find if the DBB file has been ftp'd from ISLN518
touch -t `date +%m%d0000` /tmp/$$
#count the number of dbb files found in the /Server1/dbbfile1 and dbbfile2 directories

DBB_FILE=`find /Server1/dbbfile1/ /Server1/dbbfile2/ -type f -newer /tmp/$$ |wc -l`

if [ "${DBB_FILE}" -le 0 ] ; then
DBB_FILE="CHECK FTP TRANSFER, No dbbfile found."
echo ${DBB_FILE}
else
if [ "${DBB_FILE}" -ge 1] ; then
DBB_FILE=`find /Server1/dbbfile1/ /Server1/dbbfile2/ -type f -newer /tmp/$$`
echo "Found DBB file: ${DBB_FILE}
fi
fi
rm /tmp/$$


This script errors with

syntax error at line 18: `end of file' unexpected
 
Your echo "Found DBB file: ${DBB_FILE}



should be ended with
 
echo "Found DBB file: ${DBB_FILE}[!]"[/!]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top