Hátulról a harmadik oszlopot kell kivágni? Ha igen, akkor szerintem: sed "s@\(.*\),[^,]*,\([^,]*,[^,]*,[^,]*\)\$@\1,\2@"