Print output and return values, like irb.