10-19-04 10:51 PM
On 2004-10-07 12:18, Andy wrote:
> I run UX 11 and the user use the Reflection/Netterm emulator , to
> telnet to the unix server . In Reflection , user can use the
> proprietary protocol "unxlink" to upload/download files between dos
> and unix , but netterm don't support "unxlink" , could suggest what
> protocol can use for upload/download files ? I tried zmodem can
> download but can't upload . thx.
>
> the ftp is good but I don't want the user interactive to login the
> server and input the data , I want the system can process the upload
> automatically , just like use zmodem / kernel etc.
>
> example :
> #sz abc.txt
>
> then the abc.txt will download from the shell to dos and no need to
> input anything and ask for login , as I will run it by program , so I
> can't use ftp .
> could suggest what is the good solution ? thx.
Just create a file .netrc
Then add a line:
machine <host> login <login> password <password>
where <host>,<login>,<password> is replaced with your host,login,password.
Then protect the file for reading/writing by others, or ftp will refuse to u
se it.
chmod go-rw .netrc
Now you can do ftp <host> and don't need to login.
in a script:
ftp <host> << EOF
cd somewhere
lcd somewhere
put something
quit
EOF
Or you can add a macro in .netrc
macdef sendit
cd somewhere
lcd somewhere
put something
quit
<empty line>
and then do
echo \$sendit | ftp <host>
If you do a macro with name init, it will run by default.
/bb
[ Post a follow-up to this message ]
|