|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
Given the list of files generated from this statement find . -type f How would I insert each into successive iterations of this command printf "%s\n" "put ${FILE_PATH}" | ftp myhost.com I'm on Fedora Core 5 Linux using an sh script. Thanks, - Dave |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
2006-12-7, 14:18(-08), laredotornado@zipmail.com:
> Hi, > > Given the list of files generated from this statement > > find . -type f > > How would I insert each into successive iterations of this command > > printf "%s\n" "put ${FILE_PATH}" | ftp myhost.com > > I'm on Fedora Core 5 Linux using an sh script. [...] With zsh autoload -U zfinit # if not already in your ~/.zshrc zfinit # zfopen myhost.com zfput ./**/*(D.) Or: zfput -r . to replicate the directory structure on the server. See: info -f zsh -n 'Zftp Function System' for details In any case, I wouldn't use the ftp command. Use lftp or any other scriptable ftp client. -- Stéphane |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
laredotornado@zipmail.com wrote: > Hi, > > Given the list of files generated from this statement > > find . -type f > > How would I insert each into successive iterations of this command > > printf "%s\n" "put ${FILE_PATH}" | ftp myhost.com > > I'm on Fedora Core 5 Linux using an sh script. Probably not how you want to do it. Plain old ftp is not easily scripted - it can't handle failure well. However, for very simple cases, you can use "here" files or .netrc files. See http://aplawrence.com/Unixart/scripting_ftp.html for examples and better choices for more robust use. -- Tony Lawrence Unix/Linux/Mac OS X Resources http://aplawrence.com |
|
![]() |
| Outils de la discussion | |
|
|