Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: parsing a t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 17 Topic 2217 of 2236
Post > Topic >>

Re: parsing a text file

by ric <ricardo7@[EMAIL PROTECTED] > Apr 7, 2008 at 03:36 PM

Hi Ed

Your are right, I should have written "Should it be EXACTLY this:"  :)

And another goal for you.  , the format have a space!, was my mistake:

#cat file
I went fishing for some sea <bass> .
The <bass> part of the song is very moving .
he proposed an elaborate <program> of public works . This information
was taken from the magazine .
the <program> required several hundred lines of code .


Best Regards,
  -ric


On Apr 7, 4:14=A0pm, Ed Morton <mor...@[EMAIL PROTECTED]
> wrote:
> On 4/7/2008 12:01 PM, ric wrote:
>
>
>
>
>
> > Hi People:
>
> > Could anybody tell me how can I do this with awk or bash shell?
> > I've a file with this systaxis:
>
> > #cat file
> > I went fishing for some sea <bass>.
> > The <bass> part of the song is very moving.
>
> > he proposed an elaborate <program> of public works.This information
> > was taken from the magazine.
> > the <program> required several hundred lines of code.
>
> > I need a script that gets 3 previus words and 3 words after the
> > tag(<>) from a text file,EXCEPT the words greater than
> > 2 chars length(example of,a,an).
>
> > Returning something like this:
>
> > #----------------------------------
> > for some sea bass
> > The bass part the song
> > proprosed elaborate program public works
> > the program required several hundred
>
> "something like" is kinda vague. Should it be EXACTLY this:
>
> -----------
> for some sea bass
> The bass part the song
> proposed elaborate program public works.This information
> the program required several hundred
> ----------
>
> Note in particular the interpretation of "works.This" as one "word"
since =
it
> contains no spaces. If you want to use something other than spaces as
"wor=
d"
> delimitters, you'll have to tell us what the delimitters are or some
other=
 way
> to recognise a "word".
>
> Regards,
>
> =A0 =A0 =A0 =A0 Ed.- Hide quoted text -
>
> - Show quoted text -




 17 Posts in Topic:
parsing a text file
ric <ricardo7@[EMAIL P  2008-04-07 10:01:05 
Re: parsing a text file
gazelle@[EMAIL PROTECTED]  2008-04-07 17:17:26 
Re: parsing a text file
ric <ricardo7@[EMAIL P  2008-04-07 14:29:48 
Re: parsing a text file
Janis Papanagnou <Jani  2008-04-08 00:15:18 
Re: parsing a text file
Janis Papanagnou <Jani  2008-04-08 00:10:01 
Re: parsing a text file
"Anton Treuenfels&qu  2008-04-07 22:31:43 
Re: parsing a text file
Ed Morton <morton@[EMA  2008-04-07 17:14:10 
Re: parsing a text file
ric <ricardo7@[EMAIL P  2008-04-07 15:36:52 
Re: parsing a text file
ric <ricardo7@[EMAIL P  2008-04-07 16:00:54 
Re: parsing a text file
Janis Papanagnou <Jani  2008-04-08 01:05:40 
Re: parsing a text file
ric <ricardo7@[EMAIL P  2008-04-07 19:07:38 
Re: parsing a text file
Ed Morton <morton@[EMA  2008-04-08 07:16:06 
Re: parsing a text file
Janis <janis_papanagno  2008-04-08 05:47:41 
Re: parsing a text file
Ed Morton <morton@[EMA  2008-04-08 07:58:29 
Re: parsing a text file
ric <ricardo7@[EMAIL P  2008-04-08 08:03:47 
Re: parsing a text file
ric <ricardo7@[EMAIL P  2008-04-08 14:39:18 
Re: parsing a text file
Ed Morton <morton@[EMA  2008-04-09 12:38:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 8:33:13 CDT 2008.