#!/bin/sh # ns, 14-Aug-91 Noah Friedman # $Id: ns,v 1.4 1996/10/23 01:56:21 friedman Exp $ # # A front end for nslookup(1) to provide more access to the interactive # features on the command line. It also does some smart manipulation of # arguments (like automatically twiddling IP addresses when doing PTR # queries). I don't have time to document all the bugs^H^H^H^Hfeatures. I # suggest you read through the script here, and read the manual page for # nslookup if you haven't already. # # Old versions of bash may not be able to parse this script. I've only # tested it under 1.09 and later. Also, it requires you to have a working # nslookup. # # Public domain. # # TODO: write this in v7 sh. # Feed this script to bash if sh is not already bash in disguise. case "${BASH_VERSION+set}" in set ) : ;; * ) exec ${BASH-bash} $0 ${1+"$@"} ;; esac function usage () { if [ $# -gt 0 ]; then echo -e "${progname}: $*\n" 1>&2 fi cat 1>&2 <&1 | egrep "${ns_output_regexp}" } main "$@" # # eof #