Set a target of 339 runs, a collapse-prone Bangladesh were all out for 123 in 29.3 overs in their second innings on the third day.