Re: How to disable interactive prompt and autologon inside a shell script
From: Colin M ("Colin)
From: "Colin M" <colin (at) wew (dot) co (dot) uk> Date: Fri, 4 Apr 2003 09:11:09 +0100
"xo99ox" <email@example.com> wrote in message
> I am trying to run a ftp function inside a shell script. However no
> matter what I do, the -i and -n cannot be recognized by the ftp
> function. They were read as illegal option by the su function.
> Therefore, it still prompt for password.
tried enclosing the command in quotes?
> How can I make it work with the disable interactive prompt and
> autologon inside the shell script? I also tried to create a .netrc
> under the user home directory, but it didn't have any effect.
...if you've specified '-n' it will be ignored until you you issue a 'USER
> content of ftpfile:
> cd /u0x/path
> lcd /u0x/anotherpath
> mget *
If you insert a line at the top of the script:
user notroot password
and either replace password with the relevant value, or omit it if it is in
.netrc it should work. e.g.
user anonymous firstname.lastname@example.org