![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling expect scripts from other expect scripts | seva | Shell Programming and Scripting | 0 | 04-03-2008 10:45 AM |
| scripts please | rrdore | SUN Solaris | 2 | 12-07-2006 02:35 AM |
| use of ssh in scripts | esham | Shell Programming and Scripting | 7 | 11-16-2005 08:27 AM |
| Help with GDL to SQL scripts | ch4r1e5 | Shell Programming and Scripting | 0 | 10-31-2005 02:51 PM |
| using su in scripts | uchachra | UNIX for Dummies Questions & Answers | 3 | 03-11-2002 10:24 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#15
|
|||
|
|||
|
Quote:
But is there a way to read from a file about the directories for an example , the directories are not going to be constant and i am trying to get a file from a server by reading the param file a.txt and placing it in a directory in the target which should also be read from a file i am struggling a bit here can anyone help me on this Thanks |
| Forum Sponsor | ||
|
|
|
#16
|
||||
|
||||
|
here's an idea to expand upon - it probably does not answer your specific question, but should make you think how to adopt it to what you need.
Quote:
Code:
#!/bin/ksh
ftp -nv <<EOF
open $FTP_SRVR
user $FTP_USR
pass $FTP_PWD
ascii
cd $ifile
lcd "$ofile"
$(sed -e 's/^/get /g' ${listOfFiles})
bye
EOF
Last edited by vgersh99; 11-30-2007 at 01:27 PM. |
|
#17
|
|||
|
|||
|
Quote:
before the ftp session starts |
|
#18
|
||||
|
||||
|
yes. the value of variable 'listOfFiles' is the pathname to the file containing the 'file names' that you need to operate on (one per line).
|
|
#19
|
|||
|
|||
|
Just Checking whether will it work , if i give the directory there in list of files
mean to say only the directory name and getting all the files in the directory to the remote server? Thanks |
|
#20
|
||||
|
||||
|
Quote:
what exactly do you want to specify?
|
|
#21
|
|||
|
|||
|
combination of 1 & 3
I am asking the User to enter the Source Server he enters the source userid& Password Loggin to the source server and getting some files This is my basic scenario but i have a requirement that my filename and directory paths are not Static , so i need to define the directory to login to the source server and need to define the filenames and also need to define where i need to place the file (get) to the target server Please let me know if this is a bit confusing Thanks |
|||
| Google The UNIX and Linux Forums |