The Duke of Edinburgh has perfected the art of saying hello and goodbye in the same handshake.