title: Syntax error in shell script
body: <p>I have a small shell script that performs a very simple task</p>
  
  <pre><code>#!/bin/bash
  while read LINE; do
    output=$(curl -iL --head "$LINE" | grep laravel)
    if [[ $output ]] &amp;&amp; echo "$LINE"
  done &lt; url-list.txt
  </code></pre>
  
  <p>I pass a file called <code>url-list.txt</code> to the script, and it outputs a file that contains a subset of the urls from the original file that match the grep <code>laravel</code>. </p>
  
  <p>However, I seem to have a syntax error in the script:</p>
  
  <pre><code>$ ./processurls.sh &gt; laravel.txt
  ./processurls.sh: line 5: syntax error near unexpected token `done'
  ./processurls.sh: line 5: `done &lt; url-list.txt'
  </code></pre>
  
  <p>Can someone help me debug this, as it should be rather simple, but I am confused as to what the correct syntax would be.</p>
  
  <p>Also, is there a better way to do this?</p>
  
  <p>What I am trying to do is determine which sites (out of a list of approximately 1000 sites) are using what platform or framework.</p>
  
  <p>Naturally, I realise that there are limitations to sniffing out the platforms and frameworks, but I need to gather statistics on various sites for the purposes of providing a report to a client.</p>
  
  <p>Specifically, I need to try and see how many of these sites are using Joomla, Drupal, Wordpress or a PHP Framework such as Laravel, Code Ignitor, Symfony2, CakePHP and FuelPHP.</p>
  
  <p>I assumed that this script could be modified multiple times to replace the grep search with a new term and then run the script with a different output file for each search term.</p>