I wrote script for downloading zip files from ftp, and than unziping each different extension to own folder.
download.sh
#!/bin/bash
ftp -in sitehere.com << EOF
user username pass
binary
hash
lcd ./temp
mget *.zip
bye
unzip -n './temp/*.zip' -d ../../base/images/ *.TIF
unzip -n './temp/*.zip' -d ../../base/dbfs/ *.dbf
But after downloading i have in terminal i have 2 errors “Unknown format”.
Tell me please what I doing wrong?
Thanks.
Insert
EOFat the end of the FTP command list. Without it the twounzipcommands are sent to the FTP server.