Shell Scripting

Hi,

I have a text file as shown below,

0,D,R001,D,RAJA,N
0,O,R002,D,RAMA,N
0,D,R003,T,ROHIT,D,ASHA,N
0,T,R004,D,ROSHAN,D

I want to concatenate 3rd field with a 5th field, 7th field,9th field etc...
How can i do this?
2nd,4th,6th ,8th fields etc.. will be having only the following characters. "D,O,N,T". Not more than these 4 characters.

Please, can anyone help me to do this?

Try...

cut -d, -f3,5,7 file

hi
Thanks a lot
but there can be any number of fields in a line.

so we would not be able to specify field numbers 5,7 etc.
Even the data R001 is for example. it can even be as " lik that, we are". so even in this we will b having , seperator