Search Results

Search: Posts Made By: Mark_orig
2,397
Posted By pseudocoder
Yeah, because I (apart from the Perl script) only...
Yeah, because I (apart from the Perl script) only helped you to solve this problem:
# but I want to check if file is .java or .c++ not a simple file (-f), I don't know how to do it..

The part...
1,623
Posted By danmero
awk...
awk '{split($(NF-1),a,"/");b[a[3]]+=$(NF-2)}END{for(i in b) print i,"$"b[i]}' file
2006 $14000
2007 $23400
2008 $98000
2009 $42000

This is only for cost per year.
3,956
Posted By ripat
Start with this: awk -F"[. ]"...
Start with this:

awk -F"[. ]" '{t[$11]+=$15}END{for(i in t) printf "%s %s\n",i,t[i]}' infile
1,623
Posted By danmero
awk '/^TK/{print...
awk '/^TK/{print $2,$3;c+=$5}{a[$7]+=$5}END{x="Total cost ";print x" for TK is "c ORS;for (i in a){print i"\t" x" per model "a[i]}}' file
Showing results 1 to 4 of 4

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