Home » Infrastructure » Unix » Help me: ftp script unix from Host to Client Server
Help me: ftp script unix from Host to Client Server [message #97380] Thu, 04 April 2002 22:51 Go to next message
Laura
Messages: 12
Registered: September 2000
Junior Member
Urgent
I need to write a unix ftp script that picks files as soon as they arrive in HOST(TSO), in certain disk viewed by Unix partition, and send them to a
knowned remote address IP.
Thanks in advance.
Laura
Re: Help me: ftp script unix from Host to Client Server [message #97381 is a reply to message #97380] Fri, 05 April 2002 07:29 Go to previous message
Grant
Messages: 578
Registered: January 2002
Senior Member
#!/bin/ksh
#
# Script to use FTP using a file created dynamically.
# 3/15/01 Grant_howell
#
# Check if file exists.
if test -a $HOME/data/message.dat
then
PWD=`cat $HOME/passwd/oracle` # Get the password and plug it in PWD.
# Create the FTP file.
echo "Begin FTP Script..."
echo "open cronus" > ftptmp.scr
echo "user oracle $PWD" >> ftptmp.scr
echo "ascii" >> ftptmp.scr
echo "cd data" >> ftptmp.scr
echo "lcd data" >> ftptmp.scr
echo "put message.dat" >> ftptmp.scr
echo "cdup" >> ftptmp.scr
echo "close" >> ftptmp.scr
ftp -inv < ftptmp.scr
echo "END FTP Script..."
rm ftptmp.scr
rm $HOME/data/message.dat
fi
Previous Topic: how can i create two different database in one box?
Next Topic: oracle8i install on solaris8 intel
Goto Forum:
  


Current Time: Tue Apr 16 09:20:04 CDT 2024