• 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: Do shell script help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do shell script help


  • Subject: Re: Do shell script help
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 9 Nov 2006 16:43:52 -0800

On Nov 9, 2006, at 2:59 PM, Chris Swain wrote:

I have written a droplet that uses a shell script (from macosxhints) to identify potential duplicate files, this works beautifully on my laptop but fails on my desktop machine.

If I remove the "try" I get an applescript error that appears to be the names of duplicate files, so it looks like the "do shell script" is working (it also works in the Terminal) but for some reason I can't set the_results to the text returned from the shell script?

"Works" is using the term a bit loosely. If "do shell script" is throwing an error, then that means the command is exiting with a non- zero status, which usually means that it thinks something is wrong. The fact that the output you want is showing up as the error message is sort of accidental -- if the command exits with a non-zero status, then whatever came out on stderr becomes the error message -- unless there wasn't anything, in which case it uses the contents of stdout. This can be highly misleading. You need to figure out what's going on in dupecheck. You should also have a look at TN2065 <http://developer.apple.com/technotes/tn2002/tn2065.html >, which answers a lot of usage questions about "do shell script".



--Chris Nebel AppleScript Engineering

P.S.: If you can assume you're running on Tiger, you can use "path to resource" to locate dupecheck instead of "path to me" and then building the rest yourself.
_______________________________________________
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/mailman//archives/applescript-users


This email sent to email@hidden
References: 
 >Do shell script help (From: Chris Swain <email@hidden>)

  • Prev by Date: Is this a known bug?
  • Next by Date: Is this a known bug?
  • Previous by thread: Is this a known bug?
  • Next by thread: Is this a known bug?
  • Index(es):
    • Date
    • Thread