• 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: Shell Script not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell Script not working


  • Subject: Re: Shell Script not working
  • From: "Mark J. Reed" <email@hidden>
  • Date: Tue, 31 Jul 2007 12:59:38 -0400

First, this doesn't really belong on the Applescript list, as the recent/ongoing exercise in t(hr)e(a)dium has made clear.  But since folks are answering anyway...

On 7/31/07, Doug McNutt <email@hidden> wrote:
The interface to sudo requires that you type in a password the first time you use it.


Only because it's configured that way; you can change /etc/sudoers to allow passwordless sudo if you want.  As you say, not as secure, but at least having to preface dangerous commands with "sudo " makes it harder to ruin the system accidentally.

But what is the context in which this script is being run?  Could you not just run the whole thing under a single sudo (or "do shell script with privileges") instead of issuing a separate sudo command for each rm?  If nothing else, you could do

sudo bash -c "rm foo; rm bar; rm blah; ..."




--
Mark J. Reed <email@hidden>
 _______________________________________________
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

References: 
 >Shell Script not working (From: bca <email@hidden>)

  • Prev by Date: Re: Shell Script not working
  • Next by Date: Re: AppleScript and shell scripting
  • Previous by thread: Re: Shell Script not working
  • Next by thread: Date weirdness
  • Index(es):
    • Date
    • Thread