• 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: put sed script in Applescript - Solved!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell: put sed script in Applescript - Solved!


  • Subject: Re: Shell: put sed script in Applescript - Solved!
  • From: Laine Lee <email@hidden>
  • Date: Wed, 18 Feb 2004 10:02:26 -0600

Here's another possible way.

---------

property newline : ASCII character 10
property tmpfile : "/tmp/execme"

set theShellScript to "command line 1" & newline & "command line 2"

do shell script "echo " & quoted form of theShellScript & " > " & tmpfile
do shell script "chmod +x " & tmpfile

do shell script tmpfile with administrator privileges

The "with administrative privileges" may not be necessary.

---------


--
Laine Lee
email@hidden
http://lonestar.utsa.edu/llee
_______________________________________________
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.

References: 
 >Re: Shell: put sed script in Applescript - Solved! (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: AppleScript Read file in Filemaker
  • Next by Date: Re: Re: AppleScript Read file in Filemaker
  • Previous by thread: Re: Shell: put sed script in Applescript - Solved!
  • Next by thread: RE: Shell: put sed script in Applescript
  • Index(es):
    • Date
    • Thread