Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### YOU MUST CHANGE $99 to your field spec!
- (Works with spaces)
- MAX: awk 'BEGIN {max = 0} {if ($99>max) max=$99} END {print max}' data.dat
- AVG: awk '{sum=sum+$99} END {print sum/NR} data.dat
- Works with commas:
- MAX: awk 'BEGIN {FS=","; max = 0} {if ($99>max) max=$99} END {print max}' data.dat
- AVG: awk 'BEGIN {FS=","} {sum=sum+$99} END {print sum/NR} data.dat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement