Re: Passing calls to an AS app via shell?
Re: Passing calls to an AS app via shell?
- Subject: Re: Passing calls to an AS app via shell?
- From: Johnny AppleScript <email@hidden>
- Date: Fri, 08 Oct 2004 11:47:19 -0600
On 04/10/08 8:42 AM, "Pierre N" <email@hidden> wrote:
> - It has to be the "Temporary Items" folder
> Do you have any experience with UNIX? Can you send me the result of the
> following shell command (in Terminal.app and in /Users/ja folder):
> ls -l
> It has to be something to do with the folder.
[jaG4:~] ja% ls -l
total 208
drwxrwxrwx 16 ja wheel 544 19 Feb 2003 America Online
drwx------ 10 ja staff 340 8 Oct 06:25 Desktop
drwx------ 27 ja staff 918 8 Oct 09:27 Documents
-rwxr-xr-x 1 ja staff 0 9 Mar 2004 Hurz
drwx------ 76 ja staff 2584 8 Oct 09:27 Library
drwx------ 7 ja staff 238 30 Sep 00:23 Movies
drwx------ 14 ja staff 476 5 Oct 01:23 Music
-rwxr-xr-x 1 ja staff 0 9 Mar 2004 Pfurz
drwx------ 17 ja staff 578 28 Sep 23:24 Pictures
drwxr-xr-x 16 ja staff 544 24 Sep 19:36 Projects
drwxr-xr-x 8 ja staff 272 26 Mar 2002 Proxies
drwxr-xr-x 8 ja staff 272 3 Sep 21:06 Public
drwxr-xr-x 12 ja staff 408 1 Oct 19:25 Sites
drwxr-xr-x 2 ja staff 68 8 Oct 08:13 Temporary Items
drwxr-xr-x 4 ja staff 136 30 Jun 13:34 bin
[jaG4:~] ja%
I can write to any folder in that directory that does not have a space in
the name; if I remove the space from the very same folder, echo (when using
~ in the path) writes just fine; when I use the full path without the tilde,
it works fine even with spaces (as long as they are properly escaped or
quoted).
On 04/10/08 8:43 AM, "Kristofer Szymanski" <email@hidden>
wrote:
> There is simply no Temporary Items directory in your home directory.
Au contraire. See above.
On 04/10/08 8:53 AM, "Martin Orpen" <email@hidden> wrote:
> Nah, you've just got a problem with those quote marks.
> Try adding a backslash:
> Escaping the space should work.
> do shell script "echo hello >> ~/Temporary\\ Items/filename.txt"
On 04/10/08 8:50 AM, "Gnarlodious" <email@hidden> wrote:
> This works for me in 10.3.5:
> do shell script "echo hello >> ~/Temporary\\ Items/filename.txt"
do shell script "echo hello >> ~/Temporary\\ Items/filename.txt"
--> "sh: line 1: /Users/ja/Temporary Items/filename.txt: No such file or
directory"
On 04/10/08 10:28 AM, "Steven D.Majewski" <email@hidden> wrote:
> Or use 'quoted form of "Temporary Items" '
> There could also be a problem with interpreting the "~"
> There are differences in the environment whether running from
> Script Editor or osascript ( and probably with other methods also).
> I notice, from Script Editor, the first of these works for me:
> ( after doing a mkdir and adding a file from the shell )
> do shell script "ls ~/" & quoted form of "Temporary Items/"
> While the second version does not show the items in that dir:
> do shell script "ls " & quoted form of "~/Temporary Items/"
> The original poster may be getting an error because of the "~/"
> rather than a problem quoting the spaces.
Thanks for all the effort, folks; I especially appreciate Steven's
hypothesis that there is an interpretation issue with '~', as that
definitely seems the case as I stated above.
I'm not the smartest apple on the tree, but I did say I tried all kinds of
quoting, escaping, etc.; again, this only occurs on spaced names when '~' is
used to enumerate the user path. If I coerce the full file path when the
user path is involved, it (usually) works just fine. And it *ONLY* fails on
the 'echo message >>' command (that I've found); every other *NIX command I
use with '~' has no problems. Just echo. On all three 10.3.x machines within
my reach and one 10.2.x box, as well.
I must have something unique to my configs that breaks it, but I can't
imagine what it is, unless it's the /Users/ on a different volume, but that
makes little sense, given that it's a valid thing to do.
Cheers -- JA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden