From owner-freebsd-questions@FreeBSD.ORG Sun Sep 28 03:08:01 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12C391065698 for ; Sun, 28 Sep 2008 03:08:01 +0000 (UTC) (envelope-from LConrad@Go2France.com) Received: from mgw1.MEIway.com (mgw1.meiway.com [81.255.84.75]) by mx1.freebsd.org (Postfix) with ESMTP id C6C068FC0C for ; Sun, 28 Sep 2008 03:08:00 +0000 (UTC) (envelope-from LConrad@Go2France.com) Received: from VirusGate.MEIway.com (virusgate.meiway.com [81.255.84.76]) by mgw1.MEIway.com (Postfix Relay Hub) with ESMTP id 66BDF471CEB for ; Sun, 28 Sep 2008 05:08:00 +0200 (CEST) Received: from localhost (localhost.MEIWay.com [127.0.0.1]) by VirusGate.MEIway.com (Postfix) with SMTP id B32653869A9 for ; Sun, 28 Sep 2008 05:08:04 +0200 (CEST) (envelope-from LConrad@Go2France.com) X-AV-Checked: Sun Sep 28 05:08:04 2008 virusgate.meiway.com Received: from mail.Go2France.com (ms1.meiway.com [81.255.84.73]) by VirusGate.MEIway.com (Postfix) with ESMTP id 7A3D93865CD for ; Sun, 28 Sep 2008 05:08:04 +0200 (CEST) (envelope-from LConrad@Go2France.com) Received: from TX2.Go2France.com [66.90.247.9] by mail.Go2France.com with ESMTP (SMTPD32-7.07) id A2F1754E00E0; Sun, 28 Sep 2008 04:58:57 +0200 X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Sat, 27 Sep 2008 22:06:50 -0500 To: freebsd-questions@freebsd.org From: Len Conrad Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <200809280458484.SM01744@TX2.Go2France.com> Subject: help with AWk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 03:08:01 -0000 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