• 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
do shell script "sudo -v"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

do shell script "sudo -v"


  • Subject: do shell script "sudo -v"
  • From: "Timothy H. Kaiser, Ph.D." <email@hidden>
  • Date: Fri, 14 Dec 2001 13:37:58 -0800

I want to run a command that requires input using

do shell script

in particular I want to run sudo -v

set input to "sudo -v"
set theResult to do shell script input as string

sudo asks for a password.

So what i want to do is something like

set input to "sudo -v & return & "my_password" & return

but that does not work since (I assume) my_password is not
sent until sudo returns.

Any ideas?

Tim


  • Follow-Ups:
    • Re: do shell script "sudo -v"
      • From: Sean Elfstrom <email@hidden>
  • Prev by Date: A.S. in OS X
  • Next by Date: Re: do shell script "sudo -v"
  • Previous by thread: Re: Re: A.S. in OS X
  • Next by thread: Re: do shell script "sudo -v"
  • Index(es):
    • Date
    • Thread