Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unix script question

Re: Unix script question

From: Viraj Luthra <viraj999_at_lycos.com>
Date: Wed, 31 Jan 2001 20:40:53 -0800
Message-ID: <F001.002A6C07.20010131191023@fatcity.com>

Charlie,

You could also do this:-

if [ -f check_file ] 2> /dev/null; then # any error messages are not

                                          diplayed.
  ftp ... # write the file name after ftp fi

Tell me if you still have problems and can help.

Regards,

Raja

--

On Wed, 31 Jan 2001 13:55:44  
 Charlie Mengler wrote:

>
>
>"Hand, Michael T" wrote:
>>
>> Roy,
>> I would stick with the test commands you are using. One point, the -s tests
>> two condition: does the file exist AND is it > 0 bytes, therefore you will
>> have to break up you test into 2 parts
>> test -a does the file exist, and then
>> test -s
>>
>> Regards,
>> Mike Hand
>> Polaroid Corp
>>
>> -----Original Message-----
>> Sent: Wednesday, January 31, 2001 2:48 PM
>> To: Multiple recipients of list ORACLE-L
>>
>> finally...the question...
>>
>> can a unix scripting guru assist me in the code that checks if a file is a
>> zero
>> byte file?
>>
>> thanks in advance...Roy
>>
>> below is the current portion of the script that checks for errors:
>>
>> put file1 'file1'
>> get 'file1' check_file
>> bye
>> !EOF
>>
>> # First if statement will check to see if the check file exists
>>
>> if test ! -s "check_file"
>> then
>>
>> # if the file does not exist, send the failed message and exit the program
>>
>> echo Failed to pull a check file back from the FTP
>> echodo /usr/ucb/mail -s ftp_of_file1.FAILED `cat $EMAIL/fail.list` <
>> $EMAIL/fail.msg
>>
>> --
>> Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> --
>> Author: Roy Ferguson
>> INET: rferguso_at_level1.com
>>
>> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>> San Diego, California -- Public Internet access / Mailing Lists
>> --------------------------------------------------------------------
>> To REMOVE yourself from this mailing list, send an E-Mail message
>> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>> the message BODY, include a line containing: UNSUB ORACLE-L
>> (or the name of mailing list you want to be removed from). You may
>> also send the HELP command for other information (like subscribing).
>> --
>> Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> --
>> Author: Hand, Michael T
>> INET: HANDM_at_polaroid.com
>>
>> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>> San Diego, California -- Public Internet access / Mailing Lists
>> --------------------------------------------------------------------
>> To REMOVE yourself from this mailing list, send an E-Mail message
>> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>> the message BODY, include a line containing: UNSUB ORACLE-L
>> (or the name of mailing list you want to be removed from). You may
>> also send the HELP command for other information (like subscribing).
>
>--
>Charlie Mengler Maintenance Warehouse
>charliem_at_mwh.com 10641 Scripps Summit Ct
>858-831-2229 San Diego, CA 92131
>HOME DEPOT - The Big Boy's Toy store!!!!!!!!!!!!!!!!!
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Charlie Mengler
> INET: charliem_at_mwh.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
>
Get your small business started at Lycos Small Business at http://www.lycos.com/business/mail.html -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Viraj Luthra INET: viraj999_at_lycos.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Wed Jan 31 2001 - 22:40:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US