There are N strings in a text file and I want to append the matching strings with a number  

so for example if there is 

```
id, col  ,   col  ,   col   ,   col  ,  position  ,class ,sal ,empno

```

so i want to produce it like 

```
id, col_1,   col_2,   col_3,    col_4,   position ,class ,sal ,empno

```

I can do it like this but don't like it

```
sed -r 's/col/col1/1;s/col/col2/2;s/col/col3/3' 

```