![]() |
|
|
|
|
|||||||
| 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 |
|
#22
|
||||
|
||||
|
ok - here's a sample format of the file that specifies what you're 'get'-ing where it supposed to go:
listOfFile.txt: Code:
/sourceDirPath1/sourceFileName1 /destinationDirPath1 /sourceDirPath1/sourceFileName2 /destinationDirPath1 /sourceDirPath2/sourceFileName1 /destinationDirPath2 /sourceDirPath3/sourceFileName1 /destinationDirPath3 Code:
#!/bin/ksh
listOfFiles='listOfFile.txt'
ftp -nv <<EOF
open $FTP_SRVR
user $FTP_USR
pass $FTP_PWD
ascii
$(sed 's#^\([^ ][^ ]*\)/\([^ ][^ ]*\) \(.*\)#get \1/\2 \3/\2#' ${listOfFiles})
bye
EOF
Good luck! |
| Forum Sponsor | ||
|
|
|
#23
|
|||
|
|||
|
i have a same situation , i somehow manged to read from a file and getting the files and source to target ..
After that , i need to replace few characeters in each file , can i have a hint how can i login to that directory , using param.txt in the target server Thankyou!! |
|
#24
|
||||
|
||||
|
Code:
#!/bin/ksh
for file in $(< ${listOfFiles} )
do
ex - ${file} <<EOF
%s/foo/bar/g
wq!
EOF
done
|
|
#25
|
|||
|
|||
|
Quote:
Thanks for your help , when i use the logic , script is in Hung Mode and when also it is not loggin in to that directory , please correct me if i am wrong Thanks |
|
#26
|
|||
|
|||
|
If you dont need
mget * to prompt you for your answer, u can use "-i" option with ftp Rakesh UV |
|
#27
|
|||
|
|||
|
Quote:
Thanks , but i am not sure of this one .. when i give the following in my script example : listOfFiles has Unix (which is a directory ) and it has to login to that directory , by reading the param file but the script is getting hung am i doing something wrong , please let me know Thanks |
|
#28
|
|||
|
|||
|
Thanks , i have completed it by using While Loop
Thanks Guys |
|||
| Google The UNIX and Linux Forums |