Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Sep 2008 22:06:50 -0500
From:      Len Conrad <LConrad@Go2France.com>
To:        freebsd-questions@freebsd.org
Subject:   help with AWk
Message-ID:  <200809280458484.SM01744@TX2.Go2France.com>

next in thread | raw e-mail | index | archive | help

The logic desired if

If IP has no PTR, print "PTR_NUL", else print the PTR.


dig +short -x 1.2.3.4 | awk '{if ( $0 == "" ) {print "PTR_NUL" } else {print $0 } }'

... works if PTR exist, but if no PTR, PTR_NUL doesn't print.

thanks
Len





______________________________________________
IMGate OpenSource Mail Firewall www.IMGate.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809280458484.SM01744>