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.
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:
#!/bin/bash
for f in `cat /var/www/vhosts/domainlist`
do
if
domain=$f
[ "$domain" ] ;
then
whois $f | grep -i domainregistrar > /dev/null
if
[ $? -le 0 ] ;
then
echo $f >> our_registrar
else
echo $f >> external_registrar
fi
fi
done
echo "Done, check our_registrar file."
I've tried this first: http://moblog.bradleyit.com/2010/02/simple-bash-progress-bar-function.html
And then this but with no luck.
What do you reckon is the easiest way to get a progress bar implemented into that script?