From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,182abf2aca72b8c9 X-Google-Attributes: gidfee84,public From: Sua Subject: Re: ftp automatic login Date: 1999/08/25 Message-ID: <37C3B3B7.F7777B6A@theophys.kth.se>#1/1 X-Deja-AN: 516941861 Content-Transfer-Encoding: 7bit References: <37C24ABD.93623EA6@poczta.wp.pl> Organization: KTH Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Hej. acturro wrote: > > does someone know how to send files selected i.e. by command find via > ftp using automatic login information $HOME/.netrc? (as parameter list > for command mput) > > If pipe is on and the first character of the file name is the vertical > bar (|) the remainder of the argument is interpreted as shell command. > ftp then forks a shell. > But it does not work. Well, try this (you can write all this stuff on one line, if you remove comments): echo "machine login password macdef init" > .netrc; echo "prompt" >> .netrc; # probably not needed find . -name "whatever" -exec echo "put" {} >> .netrc \; ; echo "bye" >> .netrc; echo >> .netrc; ftp; rm -f .netrc # just in case (the file will be world readable, probably) Change into your.remote.machine.name, into your remote login, into your remote passwd, and <. -name "whatever"> into whatever you use for your find command. I'd install ssh and use scp in your case, however. Regards, Sua