• 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: Finding Files (was: watermark)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding Files (was: watermark)


  • Subject: Re: Finding Files (was: watermark)
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 23 Oct 2009 10:03:32 -0400

I think the important takeaway to remember is that "do shell script"
doesn't inherit your normal Terminal shell environment, so any
commands you've installed yourself (whether via MacPorts or Fink or
compiling yourself) won't be accessible accept by full path. And even
then you might find that you're missing an entry in your
shared-library search path or some other environment variable that the
application depends on.

If you find yourself unable to determine exactly what a command needs
to work properly, a sort of sledgehammer-to-the-thumbtack approach is
to try loading your whole bash login environment.  Replace:

do shell script "your command goes here"

with

do shell script "bash -lc " & (quoted form of "your command goes here")

But that will be noticeably slower and might have undesirable
artifacts and/or errors, especially if your login setup assumes an
interactive terminal environment without checking.
 _______________________________________________
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: 
 >Re: watermark (From: Rounak Jain <email@hidden>)
 >Finding Files (was: watermark) (From: Christopher Stone <email@hidden>)

  • Prev by Date: Finding Files (was: watermark)
  • Next by Date: Re: Ascii number of return
  • Previous by thread: Finding Files (was: watermark)
  • Next by thread: Tracking Down Snow Leopard's Apple Events Bug
  • Index(es):
    • Date
    • Thread