MACSCRPT Archives

June 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Barry Wainwright <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sat, 10 Jun 2006 21:12:21 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
On 10/6/06 08:34, "John Delacour" <[log in to unmask]> wrote:

> At 2:44 am +0200 10/6/06, Emmanuel wrote:
> 
>> ...in do shell script is the root level of the startup disk, while
>> in Terminal it's your Home folder.
>> 
>> In other words, for do shell script "myFile" is "Macintosh
>> HD:myFile" while in Terminal "myFile" is "Macintosh
>> HD:Users:[you]:myFile".
>> 
>> So, scripts for one and for the other have to be different.
> 
> ...unless one makes a habit of starting with "cd $HOME;"
> 
>       do shell script "echo $PWD;cd $HOME;echo $PWD;"
> 
> JD

You don't need to say cd $HOME - just a plain 'cd' will do the same thing.

-- 
Barry

ATOM RSS1 RSS2