Re: do shell script and prompts
Re: do shell script and prompts
- Subject: Re: do shell script and prompts
- From: Steve Roy <email@hidden>
- Date: Thu, 18 Mar 2004 08:55:01 -0500
Graff <email@hidden> wrote:
>
You need to use the shell command "expect". Expect handles stuff like
>
prompts for you by following a series of commands, it's basically a
>
simple scripting language.
>
>
For example:
>
--------------
>
set cvsCmd to "/usr/bin/cvs -d " & theCVSRoot
>
set thePass to "abc"
>
>
tell application "Terminal"
>
do script "expect -c \"spawn " & cvsCmd & " ;expect 'password: ' ;send
>
" & thePass & "\\n ;interact\""
>
end tell
>
--------------
I can't try it right now but from the looks of the documentation and your
example, I think this will work. Thanks!
Steve
--
Steve Roy <email@hidden>
Personal homepage: <
http://homepage.mac.com/sroy>
Projects homepage: <
http://www.roydesign.net>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.