Home » Infrastructure » Unix » FTP in UNIX Shell scripting (UNIX)
FTP in UNIX Shell scripting [message #399757] Thu, 23 April 2009 22:06 Go to next message
venson
Messages: 7
Registered: April 2009
Location: India
Junior Member
Dear all,
I dont understand the following assignment statement in my Unix shell script. I mean, i dont know what values are being sent to the variable FTP_SERVER on my script, though i kinda understood the variable may consisit of user_id, password and host of the FTP server. Any help is greatly appricated.

FTP_SERVER=`grep "login orauser password" ${HOME}/.netrc | grep ramsevr.com | cut -d" " -f2`

ftp $FTP_SERVER <<EOF
binary
cd ${DEST_DIRECTORY}
put $ftp_file $TRANSFER_FILE_NAME
quit
EOF

Also, what would be the syntax when we call FTP with user_id and password along with the HOST in Unix shell script.
Re: FTP in UNIX Shell scripting [message #399766 is a reply to message #399757] Thu, 23 April 2009 22:45 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
This has NOTHING to do with Oracle!

FTP_SERVER=`grep "login orauser password" ${HOME}/.netrc | grep ramsevr.com | cut -d" " -f2`
echo $FTP_SERVER
# display contents of variable
Re: FTP in UNIX Shell scripting [message #399768 is a reply to message #399757] Thu, 23 April 2009 22:49 Go to previous messageGo to next message
venson
Messages: 7
Registered: April 2009
Location: India
Junior Member
Yes, thats great idea on echo ing the value of the variable. But unfortunately i dont have access to the Unix box of my production server and so, i could not try this. Hence i would be really greatful if i get advised in words by experts like you.
Re: FTP in UNIX Shell scripting [message #399769 is a reply to message #399768] Thu, 23 April 2009 23:05 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
venson wrote on Thu, 23 April 2009 20:49
Yes, thats great idea on echo ing the value of the variable. But unfortunately i dont have access to the Unix box of my production server and so, i could not try this. Hence i would be really greatful if i get advised in words by experts like you.


>i dont have access to the Unix box of my production server
Neither do we have access.
So what magic do you expect/desire from us?


This has NOTHING to do with Oracle!

& you do not have a test/development box?


Previous Topic: UNIX script to check archivelog backup
Next Topic: help to find error
Goto Forum:
  


Current Time: Sat Nov 23 18:17:03 CST 2024