I have a input log file like this:

```
CLASS:CLASS1, CREATE_TIME:30-Dec-2015 00:00:06, VALID_AFTER_TIME:30-Dec-2015 00:00:12, EVAL_TIME:30-Dec-2015 00:00:12, SUCCESS:true, TIME_TAKEN:1842
CLASS:CLASS1, CREATE_TIME:30-Dec-2015 00:00:06, VALID_AFTER_TIME:30-Dec-2015 00:00:12, EVAL_TIME:30-Dec-2015 00:00:12, SUCCESS:true, TIME_TAKEN:1842
CLASS:CLASS2, CREATE_TIME:30-Dec-2015 00:00:06, VALID_AFTER_TIME:30-Dec-2015 00:00:12, EVAL_TIME:30-Dec-2015 00:00:12, SUCCESS:true, TIME_TAKEN:1842
CLASS:CLASS1, CREATE_TIME:30-Dec-2015 00:00:06, VALID_AFTER_TIME:30-Dec-2015 00:00:12, EVAL_TIME:30-Dec-2015 00:00:12, SUCCESS:true, TIME_TAKEN:1842
CLASS:CLASS2, CREATE_TIME:30-Dec-2015 00:00:06, VALID_AFTER_TIME:30-Dec-2015 00:00:12, EVAL_TIME:30-Dec-2015 00:00:12, SUCCESS:true, TIME_TAKEN:1842
CLASS:CLASS1, CREATE_TIME:30-Dec-2015 00:00:06, VALID_AFTER_TIME:30-Dec-2015 00:00:12, EVAL_TIME:30-Dec-2015 00:00:12, SUCCESS:true, TIME_TAKEN:1842

```

I want to calculate the average time taken by each class.
For example I want the **output** like this:

```
CLASS1 5.5
CLASS2 13

```

I am using the following to Extract the *class* **name** and the **time**, but not able to calculate the avg.

```
awk -F'[,:]' '{print $25 " " $41;}' modified_01.log | sort 

```

**Output:**

```
CLASS:CLASS1 10
CLASS:CLASS1 1
CLASS:CLASS2 9
CLASS:CLASS1 10
CLASS:CLASS2 17
CLASS:CLASS1 1

```