Home » Infrastructure » Unix » Problem in FTP script with lcd command
Problem in FTP script with lcd command [message #468942] Mon, 02 August 2010 10:06 Go to next message
mleninbabugmailcom
Messages: 8
Registered: June 2010
Junior Member
Hi Folks,

I have a problem with the lcd command in ftp script.I used lcd command like this lcd $GCCA_TOP/inbound/us,It is not recognizing that top. if i give the complete path of that top like lcd 'mvs/grc/ERPDEV/inbound/us'
then it will work.

I dont know why it is not working for the application top.


For that i tried with this work around like i use a cut function to extract that $GCCA_TOP and i assign it to a variable (Bcoz iam passing this path to lcd command as a parameter) and i tried to print that variable but is printing $GCCA_TOP only it is not extracting the complete path of that top.

If i hardcoded top to a varaiable like v1=$GCCA_TOP then it printing the complete path.

I dont know why the cut function behaves like that,Could you please help me out...

Thanks,
Lenin
Re: Problem in FTP script with lcd command [message #468944 is a reply to message #468942] Mon, 02 August 2010 10:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10613
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
This question bears no relation to oracle. Please post in Unix forum for better response.
To start with, you can use "here" document.

something like this. Declare your variable first.
Kaapi:ora magvivek$ sftp user@server <<EOF
> lcd $MYDIR
> #whatever you want to do.
> EOF

[Updated on: Mon, 02 August 2010 10:25]

Report message to a moderator

Problem in FTP script with lcd command [message #468950 is a reply to message #468942] Mon, 02 August 2010 10:46 Go to previous messageGo to next message
mleninbabugmailcom
Messages: 8
Registered: June 2010
Junior Member
Hi Folks,

I have a problem with the lcd command in ftp script.I used lcd command like this lcd $GCCA_TOP/inbound/us,It is not recognizing that top. if i give the complete path of that top like lcd 'mvs/grc/ERPDEV/inbound/us'
then it will work.

I dont know why it is not working for the application top.


For that i tried with this work around like i use a cut function to extract that $GCCA_TOP and i assign it to a variable (Bcoz iam passing this path to lcd command as a parameter) and i tried to print that variable but is printing $GCCA_TOP only it is not extracting the complete path of that top.

If i hardcoded top to a varaiable like v1=$GCCA_TOP then it printing the complete path.

I dont know why the cut function behaves like that,Could you please help me out...

Thanks,
Lenin
Re: Problem in FTP script with lcd command [message #468951 is a reply to message #468950] Mon, 02 August 2010 10:47 Go to previous message
BlackSwan
Messages: 21938
Registered: January 2009
Senior Member
OFF topic & this topic is now LOCKED
Previous Topic: FTP Script
Next Topic: Issue with the Memory
Goto Forum:
  


Current Time: Thu Apr 17 02:17:30 CDT 2014

Total time taken to generate the page: 0.05245 seconds