mrmagoo_83
2[H]4U
- Joined
- Aug 8, 2002
- Messages
- 3,068
I am trying to write a script for my unix setup at work. The basis is I must FTP to a secure server download a certain set of files from certain directories, then exit.
My problem is that I can get it to FTP and connect, but it will not return the username or password. Once I manually type them in it then spits them up on the screen. Now I am very new to Unix scripting so don't be too harsh on me
Here is what I have so far:
Can anyone help me fix this where it actually logs into the FTP server for me?
My problem is that I can get it to FTP and connect, but it will not return the username or password. Once I manually type them in it then spits them up on the screen. Now I am very new to Unix scripting so don't be too harsh on me
Here is what I have so far:
Code:
#!/bin/sh
/sbin/route delete default
/sbin/ifconfig zrl0:0 down
/sbin/ifconfig zrl0 down
/sbin/ifconfig znb2 192.168.1.172 broadcast 192.168.1.255 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.1.1
ftp -n 192.168.1.201
user XXX XXX
bin
cd loads/
get XXX.txt
bye
Can anyone help me fix this where it actually logs into the FTP server for me?