MACSCRPT Archives

January 2011

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:
"Mark J. Reed" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 19 Jan 2011 17:13:15 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
Backslashes are not part of the POSIX path of a file; they are a
convention used by command shells to allow you to include spaces that
don't separate arguments on the command line.

If you want a form usable by the shell, use "quoted form of (posix
path of ...)".



On Wed, Jan 19, 2011 at 4:59 PM, Claudio Braga <[log in to unmask]> wrote:
> Hi everyone,
>
> I'm trying to accomplish something I thought was simple, but I'm missing something here:
>
> I need to convert a file path (in the hfs form) to a unix path to start some shell script operations, I thought that something like this:
>
> set path to "HD:users:claudio:docs to examine:"
> set path to (posix path of x)
>
> would create a real unix kind of path, but I think there is a problem: yes the semicolumn is translated into slash, but the spaces are not treated (i.e. no backslash)
>
>  is it a known behaviour ? Am I using the wrong command ? what is the right procedure to convert a path to a unix path usable in a do shell script line ?
>
> TIA
>
> Regards
>
>
>
> Claudio Braga
> **********************
> Brescia - Cuneo
> [log in to unmask]
> **********************
>



-- 
Mark J. Reed <[log in to unmask]>

ATOM RSS1 RSS2