Subject: Re: Question on pipes
To: John Maier <jmaier@midamerica.net>
From: Todd Whitesel <toddpw@best.com>
List: netbsd-users
Date: 08/26/2000 23:55:24
> This might work, if whois resposes were not so long...
> set whoiss = `whois $dname`
> echo "$whoiss" | grep -A 100 "Domain Name"
> echo "$whoiss" | grep -A 100 "Domain servers"
> echo "$whoiss" | grep "NO MATCH"
What's wrong with running whois multiple times, i.e.
whois $dname | grep -A 100 "Domain Name"
whois $dname | grep -A 100 "Domain servers"
...
If the whois data takes a long time to fetch, then I recommend a temp file:
tmpfile=/tmp/whoisdata.$$
whois $dname > $tmpfile
grep -A 100 "Domain Name" < $tmpfile
grep -A 100 "Domain servers" < $tmpfile
grep "NO MATCH" < $tmpfile
Todd Whitesel
toddpw @ best.com