I am using below code to ftp file and it errors out saying Servname not supported for ai_socktype ... if I do not use port number 2020 then it is not connected
#!/bin/sh
USER=$1
PASSWD=$2
server=$3
remoteFile=$4
localDir=$5
ftp -n -v << EOF
open $server 2020
user $USER $PASSWD
ascii
cd $localDir
mput "$remoteFile"
quit
EOF
exit 0
It is connecting through command line when I use FTP and then open ServerName 2020