MACSCRPT Archives

September 2009

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:
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 17 Sep 2009 22:54:48 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
>
>> No way, this is shell scripting, it can't be that easy.
>>
>> Seriously?
>
> I think I just heard a light bulb come on...
>

And then it immediately went out again.

set pathName to alias "Macintosh HD:Users:edstockly:Desktop:Sep-14 Mon  
Daily TV Grid:FriForMonSurfProofLogs-09-14-09:0914_MON.TXT"
set pathName to quoted form of POSIX path of pathName
do shell script "tr '\\r' '\\n' " & pathName & " | grep " & quoted  
form of "TRAV"

Fail.

Fails with this error message.
  usage: tr [-Ccsu] string1 string2
        tr [-Ccu] -d string1
        tr [-Ccu] -s string1
        tr [-Ccu] -ds string1 string2

es

ATOM RSS1 RSS2