On 2004-10-17, Andy Lester <[EMAIL PROTECTED]> wrote:
>
> On Oct 16, 2004, at 8:02 PM, Mark Stosberg wrote:
>
>> How can I write an automate test for a shell command that prompts for
>> output. I first tried just using backticks, but that hangs waiting for
>> input.
>
> Will it take its input from STDIN?  If so, pipe stdin to it.

Wow. That was like an instant messenger speed response. That' service.

It also worked. Here's what I used:

`echo 'y' | my_shell_cmd`

I'm sure there's some other cooler way, but this works well enough for me.

        Mark

-- 
http://mark.stosberg.com/ 

Reply via email to