The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Syntax/Rules (Can I do this?)
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Syntax/Rules (Can I do this?)
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
06-22-2005
jim mcnamara
...@...
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.
jim mcnamara
View Public Profile
Find all posts by jim mcnamara
Find jim mcnamara's past nominations received
Find jim mcnamara's present nominations given