Encode output in shell.