On Thu, 28 Jan 2010 13:39:38 -0800, "Dixit, Viraj" 
<viraj.di...@cityofpaloalto.org> wrote:
> Hi,
> 
> The script that I have setup does not work if I run the .netrc file. I
> ran the commands in ftp -v mode and it did not like machine command, did
> not like passwd or pwd etc. 

Did you issue the command

        % ftp -v 0.0.0.0

(where 0.0.0.0 refers to the "machine" identifier in .netrc)?


> machine  0.0.0.0
> login VJ
> password  123456
> macdef init
> binary
> lcd /ftp
> cd /var/temp
> get newemp.db
> quit

Looks valid to me, but you could do this more easily, at least
for testing:

        % cd /var/temp
        % ftp VJ:123...@0.0.0.0/ftp/newemp.db

This should get you the file into the correct directory.



> If I use this command in .netrc it connects to the server but it does
> not connect using my login name VJ, it  points to some other name.
> 
> ftp  0.0.0.0 <ftp://ftp 0.0.0.0/> 

That's not the correct way to call the ftp program.



>  .netrc simply doesn't work in FreeBSD.

For sure it does, as described in the manpage.



> Is their someone who has a working script. Thanks!!!

See my example above.

At the moment, it doesn't seem that you "send" a file per
FTP, but "receive" one. This can also be achieved through
the .netrc file, but to make sure everything works ON BOTH
SIDES of the connection, try the ftp command given above
where the needed information is "hardcoded". You can add
the -v parameter, too.

If you require more help, describe more exactly what you're
intending to do.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to