Re: Paths & quoted form & do shell script
Re: Paths & quoted form & do shell script
- Subject: Re: Paths & quoted form & do shell script
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 8 Oct 2005 18:06:57 -0400
On 10/8/05, Martin Orpen <email@hidden> wrote:
> But, I wanted my script to check a text file that may have been written to
> disk the previous time that the script was run and grab the file path from
> that file.
>
> When I do that I get the shell choking on the path:
>
> set tFile to (path to temporary items as string) & "PSLogTest.txt"
> set thePath to paragraph 1 of (read file tFile)
What does thePath contain at this point?
> do shell script "/usr/bin/grep -i saved " & quoted form of thePath
> sh: -c: line 1: unexpected EOF while looking for matching `''
> sh: -c: line 2: syntax error: unexpected end of file
That looks to me like the pathname has an apostrophe in it that isn't
getting quoted properly. I'd really need tosee what that line looks
like to diagnose the problem.
> BTW, is there an easy way of getting an *escaped form* of a POSIX path
> without having to write a handler to do it?
I don't understand the question. You're looking for something other
than "quoted form of"?
--
Mark J. Reed <email@hidden>
_______________________________________________
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