The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: nawk help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-11-2009
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
nawk -f bep.awk rc2.d_listing > ./junk1

bep.awk:

Code:
BEGIN {
  n=split("S73isid S750vxpal.gridnode S75vxpal.StorageAgent S75vxsmfd S760vxpal.actionagent", list)
  for(i=1; i<=n; i++) {
    list[list[i]]=i
    delete list[i]
  }
}
$1 == running { print $5; next}
$9 in list


Last edited by vgersh99; 02-11-2009 at 04:02 PM..