Linear movement of open containers containing liquid is considered. The design is based on a simple linearized slosh model. An open-loop acceleration trajectory is calculated using optimal control techniques. The calculated acceleration profiles are evaluated using experiments with a laser-based sensor and recordings by a video camera. The performance is better than previous ad-hoc controllers.