Re: How to Run a "sudo" Terminal Command
Re: How to Run a "sudo" Terminal Command
- Subject: Re: How to Run a "sudo" Terminal Command
- From: "S. J. Cunningham" <email@hidden>
- Date: Sun, 13 Dec 2015 05:05:22 -0500
On Dec 12, 2015, at 7:24 PM, Paul Scott wrote:
> More generally, if you want to execute any binary or arbitrary language script, and capture and display all its output, you’d want this:
>
> on open parms
> set ListOfFiles to {}
> repeat with f in parms
> display dialog (do shell script "\"" & (POSIX path of f) & "\"")
> end repeat
> end open
>
> You could also check to see if the output was empty and avoid the display dialog. An infinite number of improvements are possible. I’ll be quiet now.
>
> Paul
>
Thanks for the suggestions and examples Paul. I was aware that I could do this using Applescript but you certainly clarified my understanding. I was, however, wondering if there were not a way to create a text shell script, mark it executable, and execute it directly without having to resort to an intermediate application like Applescript or BBEdit to avoid the terminal popping up. From the chirping crickets, I'm guessing there isn't :)
Steve
------------------
OS X 10.6.8, AppleScript 2.1.2
_______________________________________________
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