Re: do shell script and prompts
Re: do shell script and prompts
- Subject: Re: do shell script and prompts
- From: Brent Baisley <email@hidden>
- Date: Fri, 19 Mar 2004 09:19:35 -0500
You can output literal text from a shell script, like in response to a
prompt, by using this syntax:
<<ANYTEXT
password
ANYTEXT
The important piece is the <<, which tells the shell script to output
the text between the ANYTEXT as if it was typed from the keyboard.
On Mar 17, 2004, at 10:15 PM, Steve Roy wrote:
Good evening,
Is there a way to handle prompts with 'do shell script'? What I'd like
to do is run the 'cvs login' command but it gives a command line prompt
for the password. I've tried to put the password on a new line like
this:
set thePassword to "abc"
do shell script "cvs -d " & theCVSRoot & " login; " & thePassword
But that didn't work. The result was:
CVS password:
cvs [login aborted]: authorization failed: server roydesign.dyndns.org
rejected access
sh: line 1: abc: command not found
Is there a way to do this?
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.
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
_______________________________________________
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.