• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running `expect` from inside AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running `expect` from inside AppleScript


  • Subject: Re: Running `expect` from inside AppleScript
  • From: Jenni via AppleScript-Users <email@hidden>
  • Date: Wed, 8 Dec 2021 21:58:43 -0800

> The proper syntax would be do script "<your script".

        Thanks, Chris.  Between your suggestion, and finding a post mentioning
the use of 3 backslashes instead of a single one, e.g.:

expect \\\"password: \\\"

I got it to work.  However, it prints the entire script to the Terminal window
before processing it, so it looks like this:

% /usr/bin/expect -c "
dquote> ## Variables ##
dquote> set force_conservative 1
dquote> set timeout 9
dquote> set send_human {.1 .3 1 .05 2}
dquote> ## Verbose output for testing:
dquote> # exp_internal 1
dquote>
dquote> ## Login ##
dquote> spawn ssh email@hidden
dquote> expect \"password: \"
...

before it finally logs me in.  I've never seen this happen before.

        Is there any way to prevent it from printing everything to the screen
like this?  Searching for dquote didn't produce anything relevant.

Marc
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • [ OFFLIST ] Re: Running `expect` from inside AppleScript
      • From: Christopher Stone via AppleScript-Users <email@hidden>
    • Re: Running `expect` from inside AppleScript
      • From: Christopher Stone via AppleScript-Users <email@hidden>
References: 
 >Running `expect` from inside AppleScript (From: Jenni via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Running `expect` from inside AppleScript
  • Next by Date: Re: Running `expect` from inside AppleScript
  • Previous by thread: Re: Running `expect` from inside AppleScript
  • Next by thread: Re: Running `expect` from inside AppleScript
  • Index(es):
    • Date
    • Thread