I am writing a shell script and need to download patches using ftp. There are various version of patches but I would like to download patches matching pattern *$ver_LINUX* or *$ver_Generic*. The mget command below will not allow me to use or (|) option for this purpose. Can anyone please suggest if this is possible in ftp and how.
ftp -inv $FTP <<EOF
quote USER $ftp_usr
quote PASS $ftp_pass
cd $patch
binary # for zip files.
ls # Just for check
mget *${ver}_LINUX.* # downloads patches like p111229_1120200_Linux.zip
EOF
With the classical
ftpcommand, it isn’t. However, you can do this withlftp, using the-ioption ofmirror.