Quick AWK help

From: Siva Singam Santhakumar (santha_at_stepsoft.com.au)
Date: 08/25/04

  • Next message: Vinh Tran: "Need help install perl module Net::SFTP"
    Date: Wed, 25 Aug 2004 12:27:04 +1000
    To: sunmanagers@sunmanagers.org
    
    

    Dear Managers,

    Sorry for the OT

    What is wrong in this awk line?

    /usr/sbin/netstat -an |grep ESTA | awk
    '{split($4,a,".");if(a[4]=8005)DEV++;if(a[4]=8006)PROD++;print $DEV,$PROD} '

    In this line I am trying to get the total connections for ports 8005 and
    8006.

    Thanks

    -- 
    /Siva //S Santhakumar ( Santha)/
    System Administrator
    Stepsoft Pty Ltd
    Stepsoft is the developer of Foxtrot, an Enterprise
    Customer Knowledge System (CKS). Find out more
    At www.stepsoft.com.au <http://www.stepsoft.com.au/>
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers
    

  • Next message: Vinh Tran: "Need help install perl module Net::SFTP"

    Relevant Pages

    • Re: Search and replace with a BASIC program
      ... Use the RISC OS ports of the Unix command line tools such as sed and ... awk. ... Although their syntax is a bit archaic, ...
      (comp.sys.acorn.programmer)
    • Re: OT When did I know I was old...
      ... (Eugene Griessel) ... Ports especially French ones ... Never write it in C if you can do it in 'awk'; Never do it in 'awk' if ... Never invoke 'tr' when 'cat' is sufficient; ...
      (sci.military.naval)
    • Re: "make search" oddity
      ... > I only have one copy of awk on the box. ... No -- 4.x uses and will use GNU awk all the way. ... replacing an important application with one using a completely ... You can certainly install gawk from ports if you want, ...
      (freebsd-questions)
    • Re: A question for the AWK wizards
      ... any line longer than 159 characters will just overflow. ... You need to use substr() not awk to shorten a line. ... There are ports which seems to do what you want to do. ...
      (freebsd-questions)