ftp shell cmd
- ip_addr="$1"
- name="$2"
- passwd="$3"
- command1="$4"
- command2="$5"
- command3="$6"
- echo "open $ip_addr">ftp_input
- echo "user $name $passwd">>ftp_input
- echo "binary">>ftp_input
- echo "epsv4">>ftp_input
- echo "command1">>ftp_input
- echo "command2">>ftp_input
- echo "command3">>ftp_input
- echo "bye">>ftp_input
- cat ftp_input | ftp -n -i
- exit 0;
save as ftp.sh
usage
ftp 192.168.1.1 admin admin get abc