Search Results

Search: Posts Made By: scriptr2be
1,157
Posted By Don Cragun
Also let us know if (as in your example) all...
Also let us know if (as in your example) all occurrences of a given value in field 1 are on contiguous lines in your input text file.

And, please use CODE tags when posting code segments, sample...
1,157
Posted By Scrutinizer
With awk this is straightforward: awk...
With awk this is straightforward:
awk '{A[$1]+=$3} END{for(i in A) print i,A[i]}' FS=, OFS=, file
You can call this from ksh.

If you want to do this in ksh only, can you post what you have tried...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 03:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy