The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-22-2005
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,805
awk supports arrays.

The
Code:
'{ count=0 } ............. { count++ } END { print count }'

part could write to an array element instead of "print count". Instead of going crazy over this, consider a good book like the O'Reilly book 'sed & awk' If you're in Manhattan, Barnes and Noble has it.

Short answer: in awk you can do what you asked. All in one piece of awk code.