Re: Shell script and grep
Re: Shell script and grep
- Subject: Re: Shell script and grep
- From: David Hood <email@hidden>
- Date: Sun, 9 Feb 2003 14:18:35 +1300
On Sunday, February 9, 2003, at 12:18 PM, Christopher Stone wrote:
Greetings,
Can a shell scripted grep routine handle an AppleScript variables for
input and output?.
Building on the tr discussion to tidy up line endings:
set toBeGrepped to "Little
bo
peep
has
Lost
her
sheep"
set adjustTolf to (quoted form of (ASCII character 10))
set adjustfromcr to (quoted form of (ASCII character 13))
set greppedResult to do shell script ("echo " & (quoted form of
toBeGrepped) & " | tr " & adjustfromcr & " " & adjustTolf & " | grep
'L'") -- all one line
return greppedResult
_______________________________________________
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.