Re: POSIX file weirdness
Re: POSIX file weirdness
- Subject: Re: POSIX file weirdness
- From: Andrew Oliver <email@hidden>
- Date: Fri, 14 Mar 2003 09:10:27 -0800
Well yes... and no.
'do shell script' is a standard addition and not related to the terminal.
However, you can use POSIX paths in shell commands.
-- begin AS
set somePath to path to users folder
--> alias "Macintosh HD:Users:"
set posixPath to POSIX path of somePath
--> "/Users/"
do shell script "ls -l " & posixPath
--> list of home directories on this machine
-- end AS
Of course, to be safe, you should use 'quoted form of posixPath' in the 'do
shell script' line so that UNIX-unsafe characters are properly escaped.
If you do really want to use POSIX path to change directories in Terminal,
just:
tell application "Terminal" to do script "cd " & quoted form of posixPath
But this has all kinds of other issues regarding which shell to run in.
Andrew
:)
On 3/14/03 8:49 AM, "Todd Reid" <email@hidden> wrote:
>
While we're on this topic (and maybe my request is OT), can you use POSIX
>
path to, say, change directories in the Terminal via a "do shell script" in
>
Applescript?
>
>
Examples would be most helpful.
>
>
TIA,
>
>
Todd Reid
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.