drop down structure in file

I have file like this

120, rahim, d40
115, rahul, d40
113, begum, d40

I want to group this file like this

120, rahim, d40
115, rahul,
113, begum,

can any one help me on this

thanks in advance

You can do this easily in awk. Just save the value of the last field in a variable, and if it is still the same when you read the next line, do not print the last field.