title: Bash progress bar
body: <p>I'm using the following script to go through a large list of domains in whois and find the registrar (useful for server/DNS migrations) and it works fine.</p>
  
  <p>However I am wanting to incorporate a progress bar into it just for the sake of convenience. Here's my script, if it can be improved let me know:</p>
  
  <pre><code>#!/bin/bash
  for f in `cat /var/www/vhosts/domainlist`
   do
     if
     domain=$f
     [ "$domain" ] ;
     then
      whois $f | grep -i domainregistrar &gt; /dev/null
       if
       [ $? -le 0 ] ;
       then
        echo $f &gt;&gt; our_registrar
       else
        echo $f &gt;&gt; external_registrar
       fi
     fi
   done
  echo "Done, check our_registrar file."
  </code></pre>
  
  <p>I've tried this first: <a href="http://moblog.bradleyit.com/2010/02/simple-bash-progress-bar-function.html">http://moblog.bradleyit.com/2010/02/simple-bash-progress-bar-function.html</a></p>
  
  <p>And then <a href="http://www.theiling.de/projects/bar.html">this</a> but with no luck.</p>
  
  <p>What do you reckon is the easiest way to get a progress bar implemented into that script?</p>