Playing with stdin and stdout