[HPADM] AWK Question

From: Bill Beardshaw (BBeardshaw@gfd.com)
Date: Fri Feb 16 2007 - 10:32:17 EST


In the following I only one to get ONE match and then continue with the
next input record. The statements are in the order I want to match but
I only want the first match. As written some lines will match two times
and two records are written to $CATLIST, I only want one record.

awk ' $9==JB {print $1" "$2" "$4" "$8" "$3" NO_OPOOL "$9" "$10" "$NF} \
awk $10==JB {print $1" "$2" "$5" "$9" "$3" "$4" "$10" "$11" "$NF} \
awk $4==DT {print $1" "$2" "$4" "$8" "$3" NO_OPOOL NO_LIB NO_SLOT
"$NF} \
awk $5==DT {print $1" "$2" "$5" "$9" "$3" "$4" NO_LIB NO_SLOT "$NF}'
\
JB=$JBOX_NAME DT=$DEV_TYPE $OUT > $CATLIST

Bill Beardshaw
Guilford Mills, Inc
bbeardshaw@gfd.com
(336) 316-4006

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:55 EDT