I am having problems trying to get the following command working inside of a bash script:
lftp -c 'open -e "put file-name-$DATE.tar" 10.0.0.1/dir/here -u uname,password'
When this command runs from inside of the script it gives the following error:
put: file-name-$DATE.tar: No such file or directory
This is obviously because the variable $DATE (which is defined previously in the script) isn't being expanded due to the single quotes (and possibly the combo of double quotes inside). When I escape various combinations of them, however, the command still doesn't work. In true "lftp" manner it doesn't error out, it just simply doesn't do anything.