Mailing List Archive

Unix rant: (was: losts of MX's? )
At 08:07 AM 2/13/97 -0700, Eric Krohn wrote:
>
>John C. Ring, Jr. writes:
>>Unix rant: I really wish, in a shell script (I'm using bash), an application
>>such as nslookup would take it's input from the script when called, so that
>>
>>#/bin/sh
>>nslookup
>>ls -t MX switch.com > mx.out
>>exit
>>#process mx.out as required, etc.
>>
>>would work. Or, am I missing something...
>
>Did you try either of these?
>
>echo "ls -t MX switch.com > mx.out" | nslookup
>or
>nslookup <<!
>ls -t MX switch.com > mx.out
>exit
>!

Hm, o.k., I probably should have tried that :) I "forgot" about that method
when I couldn't get it to work with passwd, as passwd only accepts input from
/dev/tty (actually, it's the library routine getpass from the man pages) on a
different, minor project.

Of course, the named-xfer command is probably better for this, as with that you
could write it to remember the serial number for the zone, so you don't needlessly
do zone transfers each time.

Thanks!
-------------------------
John C. Ring, Jr.
jcring@switch.com
Network Specialist
Union Switch & Signal Inc.