This is definitely a neat trick. This way you can flush stdout regularly without modifying the code of a command.