Remove prefixes before dot

Shell : Bash shell

I have a text file with entries like below

srv.sr_num sr_number, atvx.ATTRIB_37 Product_Name, ktx.X_ATTRIB_52 Product_Type, mkx.created sr_created_date, nbv.sr_cat_type_cd sr_type, bkrx.sr_area sr_category, .. 
frx.order_id, des.stats_name , fpxg.current_id_name, ......
.
.

I want to remove all the prefixes before the dot. Any idea how I could achieve this ?

Expcted output:

sr_num sr_number, ATTRIB_37 Product_Name, X_ATTRIB_52 Product_Type, created sr_created_date, sr_cat_type_cd sr_type, sr_area sr_category, .. 
order_id, stats_name , current_id_name, ......
.
.
awk '{for (i=1; i<=NF; i++) sub("^[^.]+[.]", "", $i); print $0}' infile
1 Like

Thank You rdrtx1.
I forgot to mention, that I need to remove the dots as well (as shown in the Expected output).
But, I can live with your solution (ie. I can easily remove the dots using vi ). Thanks again

Try also

sed 's/[^., ]\+\.//g' 
1 Like