title: Deleting a file with LFTP using variables
body: <p>I'm trying to delete a file from an FTP server in my shell scrip using LFTP, but for some reason it will not use my variables, and takes them as literals.</p>
  
  <p>The code:</p>
  
  <pre><code>USERNAME="theuser"
  PASSWORD="verygoodpassword"
  SERVER="example.com"
  BACKUPDIR="thebackups"
  FILETODELETE="uselessfile.obsolete"
  
  lftp -e 'rm /${BACKUPDIR}/${FILETODELETE}; bye' -u $USERNAME,$PASSWORD $SERVER
  </code></pre>
  
  <p>What I want it to do is run:</p>
  
  <pre><code>lftp -e 'rm /thebackups/uselessfile.obsolete; bye' -u theuser,verygoodpassword example.com
  </code></pre>
  
  <p>But instead it runs:</p>
  
  <pre><code>lftp -e 'rm /${BACKUPDIR}/${FILETODELETE}; bye' -u theuser,verygoodpassword example.com
  </code></pre>
  
  <p>And of cause it can not find the literal file "/${BACKUPDIR}/${FILETODELETE}" on the FTP server and complains thus.</p>
  
  <p>What am I doing wrong???</p>
  
  <p>Cheers!</p>