automatically acknowledge commands

David Thornton david-FkEgs2FKm2NvBvnq28/GKQ at public.gmane.org
Wed Jun 21 19:40:51 UTC 2006


Chris F.A. Johnson wrote:
> On Thu, 15 Jun 2006, Neil Watson wrote:
>
>> Since Ken missed out on the last one here's another.  I have script that
>> annoyingly requires a 'y' prompt part way through.  Alas, the script is
>> not mine and may change in the future.  How can I automate the 'y'
>> answer?
>
> echo y | /path/to/script
>
> yes | /path/to/script
>
>

"expect" might do the job.

It's a "scripting" language designed to run against interactive sessions.

David
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list