take script input from stdin if no command-line argument is given