in reply to Altering Behavior of a Script

Some times, -t STDIN is used.

But here, arguments sound like the way to go. If "answer" is provided as an argument, use it. If not, prompt for it.

PS - If you're want to be interactive, use <STDIN> and not <>.

Replies are listed 'Best First'.
Re^2: Altering Behavior of a Script
by ig (Vicar) on Sep 03, 2009 at 18:33 UTC

    I never noticed -t. It even works on Windows!!