[HPADM] RE: help with a script - condition to check the size of t he file and initiate ftp

From: BAKHSHESH Kazem (BAKHSHEK@ESSILOR.fr)
Date: Thu May 12 2005 - 03:12:25 EDT


Hi
 
Hope can help
 
############pop is a flage file which can be empty or
itinitialiseted###########
 
#################################
 
And here the script
###########
 
INF=pop
 
x=$(cat $INF | wc -c)
 
        if [ $x -ne 0 ]; then
                echo "You can lunch the ftp command"
        else
                echo "$INF is empty"
        fi
 
 
 

  _____

De : hpux-admin-owner@DutchWorks.nl [mailto:hpux-admin-owner@DutchWorks.nl]
De la part de Balaji Nathan
Envoyé : mercredi 11 mai 2005 22:24
À : hpux-admin@DutchWorks.nl
Objet : [HPADM] help with a script - condition to check the size of the file
and initiate ftp

Hi admins,
Please help me on the following:
I have to set up a condition;
 
ie if the file "testxx" is zero bytes, DO NOT iniate the ftp process.
If "testxx" size is other than zero byte, initiate the ftp.
 
Please help me on the script syntax..
Thanks
Balaji

  _____

Do you Yahoo!?
Yahoo! Small Business - Try
<http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/
> our new resources site!

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:47 EDT