Home » Infrastructure » Unix » How to get the output from [ -s "abc.txt" ]
How to get the output from [ -s "abc.txt" ] [message #250475] Tue, 10 July 2007 03:43 Go to next message
Imran_Chennai
Messages: 22
Registered: June 2007
Location: CHN,INDIA
Junior Member

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
Re: How to get the output from [ -s "abc.txt" ] [message #250581 is a reply to message #250475] Tue, 10 July 2007 09:40 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>the following codes doesnt work
My car doesn't work. Please tell me how to make my car work.
Re: How to get the output from [ -s "abc.txt" ] [message #250793 is a reply to message #250581] Wed, 11 July 2007 06:25 Go to previous messageGo to next message
Imran_Chennai
Messages: 22
Registered: June 2007
Location: CHN,INDIA
Junior Member

Sorry I cant understand your qn pls type clearly...
Re: How to get the output from [ -s "abc.txt" ] [message #250796 is a reply to message #250793] Wed, 11 July 2007 06:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

/forum/fa/449/0/

Re: How to get the output from [ -s "abc.txt" ] [message #250933 is a reply to message #250475] Wed, 11 July 2007 21:24 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I cnt ndrstnd yr prblm pls typ clrly...


Please read & follow posting guidelines http://www.orafaq.com/forum/t/59966/74940/

[Updated on: Wed, 11 July 2007 21:27] by Moderator

Report message to a moderator

Previous Topic: K shell commands
Next Topic: Is it possible to load data from a text file to other one text file using SQL LOADER?
Goto Forum:
  


Current Time: Sat Apr 20 08:34:41 CDT 2024