• 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 problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell problem


  • Subject: Re: do shell problem
  • From: "Brian Mickey" <email@hidden>
  • Date: Wed, 7 Nov 2007 11:25:36 -0800

"do shell script" always uses /bin/sh to interpret your command.

see

http://developer.apple.com/technotes/tn2002/tn2065.html

Brian

On Nov 7, 2007, at 11:08 AM, Doug McNutt wrote:

At 18:37 +0100 11/7/07, luca materassi wrote:
set out to "PowerbookG4:Users:myuser:Documents:msg:test.txt"
on adding folder items to this_folder after receiving these_items

tell application "Terminal"
(do shell script "gpgwrap -p /Users/myuser/pw.txt gpg -o" & out & " -d" & these_items user name "myuname" password "mypw" with administrator privileges)
end tell
end adding folder items to

"do shell script" is not a Terminal.app command. It will use bash and create a new process for it.


"do script" is what you want if you need Terminal.app to do the work for you.

I think "out" has to be a POSIX path of "PowerbookG4:Users:myuser:Documents:msg:test.txt" or else simply delimited with UNIX style "/" separators.

You may need a full path for gpgwrap. "do shell script" will not honor any changes to $PATH you might make in a .*rc script.

Watch out for spaces in file names and tool options. "quoted form of" is good prophylaxis. "/Users/myuser/pw.txt gpg" in the above bothers me a bit.
--


--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to 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: 
 >do shell problem (From: luca materassi <email@hidden>)
 >Re: do shell problem (From: Doug McNutt <email@hidden>)

  • Prev by Date: Applescript and Bluetooth
  • Next by Date: Grammar and spelling checker
  • Previous by thread: Re: do shell problem
  • Next by thread: Re: do shell problem
  • Index(es):
    • Date
    • Thread