HI,
If you want the same answer to all questions for a particular command,
there is an amazing little utility by the name of "yes"
By default it echos an endless stream of y characters. If you pass it
anything as an argument, then that is what is echoed endlessly instead.
You can almost certainly find it in /usr/bin/yes. Just pipe the output
to the command that you want the responses for. As has already been
pointed out, if the answer varies for any given command, you should
probably use "expect".
On Thursday, July 5, 2001, at 05:35 PM, faisal gillani wrote:
> hello there
>
> can any one help me in making a small script all i
> want is that my system
> runs itself in single user mode , then run fsck on / ,
> then return to normal
> mode...
>
> i know the commands
>
> 1, init 1
> 2, fsck /
> 3, init 6
>
> i am stuck in how can i give the answers to the
> command automatically ... is
> it possible ?
>
> thanks
> Faisal
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>