In a bash script, I am using curl command on linux to download files from a FTP server.
The command I am using is the following (the information about the FTP server connexion is stored in a .netrc file):
curl -v -netrc "ftp://my.ftp.server/foo/bar.txt" -o bar.txt
This is working pretty well, except that if the bar.txt is empty (size file = 0).
How do I force curl to download the file, i.e. getting a bar.txt which is empty?