• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Terminal grep from AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminal grep from AS


  • Subject: Re: Terminal grep from AS
  • From: Goran Ehn <email@hidden>
  • Date: Thu, 27 Jan 2005 20:55:11 +0100

Sorry if I was a bit unclear before, here is a short sample. I just want to replace the Satimage grep and use the terminal grep instead, that is to strip the code off and get the text into lists one block at the time. --> {"This is ","a part ","of the test text."} -->{"This is","another text part."}

I'm somewhat unfamiliar with the possibilities when using 'do shell script', and I just want a sample of how I can pass the grep command + string and retrieve the result.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<root>
<block id="1">
<text>This is </text><text>a part </text><text>of the test text.</text>
</block>
<block id="2">
<text>This is</text><text> another text part.</text>
</block>
</root>


Regards
/goran


On Jan 27, 2005, at 5:24 PM, daniel wrote:

Can you be more specific? Generally this kind of question is difficult to help with. It's akin to saying "I want to write a script to do something with graphics." What do you want to do? What is the "given pattern"? Or make one up that will help you if we can figure out how to make it work for you.

Daniel

On Jan 27, 2005, at 4:10 AM, Goran Ehn wrote:

I'm stuck, could some please show with a sample on how to use 'do shell script' with Grep.
I want to search a string for specific tags or words in order to find the needed insertion points. My case is that I receive a large text string and I want to split this string into chunks after a given pattern and I do not whish to use external tools like BBedit or Satimage to do this.


_______________________________________________ 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
  • Follow-Ups:
    • Re: Terminal grep from AS
      • From: "Steven D.Majewski" <email@hidden>
    • Re: Terminal grep from AS
      • From: "Adam K. Wuellner" <email@hidden>
    • Re: Terminal grep from AS
      • From: Emmanuel <email@hidden>
References: 
 >Terminal grep from AS (From: Goran Ehn <email@hidden>)
 >Re: Terminal grep from AS (From: daniel <email@hidden>)

  • Prev by Date: Re: definition list recommendations?
  • Next by Date: Re: Move Document Window to Front Quark6.5
  • Previous by thread: Re: Terminal grep from AS
  • Next by thread: Re: Terminal grep from AS
  • Index(es):
    • Date
    • Thread