• 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: luca materassi <email@hidden>
  • Date: Thu, 8 Nov 2007 08:30:05 +0100



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.

I changed the out path to POSIX, removed the Tell Terminal command and double checked the spaces but still don't get any result.


set out to "/Users/user/Documents/msg/test.txt"
on adding folder items to this_folder after receiving these_items

do shell script "/bin/gpgwrap -p /Users/user/pw.txt /bin/gpg -o " & out & " -d " & these_items user name "myuname" password "mypw" with administrator privileges

end adding folder items to

I might use the "do script" command instead, but how do i pass the variables to the script?

Luca




_______________________________________________ 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
  • Prev by Date: writing Unicode to an existing Unicode text file on Intel Macs
  • Next by Date: How to convert a POSIX path to normal path?
  • Previous by thread: Re: do shell problem
  • Next by thread: TextWrangler Query GREP search query...
  • Index(es):
    • Date
    • Thread