title: Syntax error near unexpected token 'elif'
body: <pre><code>#!/bin/bash
  if [ "$1" = "boot" ]
  then
       if [ -f /var/log/boot.log ]
       then
           echo /var/log/boot.log
       elif [ -f /var/log/boot ]
       then
           echo /var/log/boot
       fi
  fi
  </code></pre>
  
  <p>This shows the output:</p>
  
  <pre><code>: command not foundline 8: GetLogfileName.sh: line 15: syntax error
  near unexpected token `elif' 'etLogfileName.sh: line 15: `        
  elif [ -f /var/log/boot ]
  </code></pre>
  
  <p>What is going wrong here?</p>