parsing-bash shell-awk

parsing-bash shell-awk

am 07.04.2008 18:24:39 von ric

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 .
The part of the song is very moving.
he proposed an elaborate of public works.This information
was taken from the magazine.
the 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:

#cat results
for some sea bass
The bass part the song
proprosed elaborate program public works
the program required several hundred

Thanks!
-ric

Re: parsing-bash shell-awk

am 07.04.2008 23:01:00 von Maxwell Lol

ric writes:

> Hi People:
>
> Could anybody tell me how can I do this with awk or bash shell?

That's a good homework assignment!

Re: parsing-bash shell-awk

am 07.04.2008 23:18:32 von ric

On 7 abr, 15:01, Maxwell Lol wrote:
> ric writes:
> > Hi People:
>
> > Could anybody tell me how can I do this with awk or bash shell?
>
> That's a good homework assignment!

hehe, Well, I'm trying to probe it' can be done with unix/linux :)

Re: parsing-bash shell-awk

am 08.04.2008 04:06:07 von Barry Margolin

In article
,
ric wrote:

> On 7 abr, 15:01, Maxwell Lol wrote:
> > ric writes:
> > > Hi People:
> >
> > > Could anybody tell me how can I do this with awk or bash shell?
> >
> > That's a good homework assignment!
>
> hehe, Well, I'm trying to probe it' can be done with unix/linux :)

"probe"? Do you mean "prove"?

It should be pretty easy using awk or perl.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***

Re: parsing-bash shell-awk

am 08.04.2008 04:33:41 von ric

On Apr 7, 8:06 pm, Barry Margolin wrote:
> In article
> ,
>
> ric wrote:
> > On 7 abr, 15:01, Maxwell Lol wrote:
> > > ric writes:
> > > > Hi People:
>
> > > > Could anybody tell me how can I do this with awk or bash shell?
>
> > > That's a good homework assignment!
>
> > hehe, Well, I'm trying to probe it' can be done with unix/linux :)
>
> "probe"? Do you mean "prove"?
>
> It should be pretty easy using awk or perl.
>
> --
> Barry Margolin, bar...@alum.mit.edu
> Arlington, MA
> *** PLEASE don't copy me on replies, I'll read them in the group ***


yes,i'll try with awk.

Thanks for all people :)