How to get the output from [ -s "abc.txt" ]

Hi,

I am trying to check the file not empty, if its not empty then i try to send other system by ftp, the following codes doesnt work

if [[ -s "${OUTBOUNDFILE}" ]]
then
echo "File ${OUTBOUNDFILE} have data"
ftp -i -n -v 204.104.22.33 >> ${FTP_LOGFILE} << EOF
user abc def
ascii
put ${OUTBOUNDFILE}
quit
EOF
else
echo "File ${OUTBOUNDFILE} is empty...ftp stopped"
fi

please give ur idea

Thanks in Advance
Imran

Try:

if ! [[ -s "${OUTBOUNDFILE}" ]]

instead of:

if [[ -s "${OUTBOUNDFILE}" ]]

The -s option gives true if the file is not zero size.

Regards