scripting++ and other joys
Sep. 29th, 2006 06:34 pmWhen PHB was asking why I was still here, I said that I was trying to find a way to batch process until EOF.
He introduced me to the joys of
I've made two scripts, that I've needed to make for a while, in the last hour, and they both do what I want them to do. Yay!
Here's one:
Additionally, today I learned about
Awesomesauce.
He introduced me to the joys of
while read foo; do and to call it by either cat file | script or script < file. He also showed me some variations on the logic: while read < file; do and while read < $1; do.I've made two scripts, that I've needed to make for a while, in the last hour, and they both do what I want them to do. Yay!
Here's one:
bulkDomainRegCheck.sh
#! /bin/bash
# performs a batch whois lookup against NetSol
while read myline
do
whois -h whois.networksolutions.com $myline
done
Additionally, today I learned about
file blah to find out what kind of file "blah" is.Awesomesauce.