parsing-bash shell-awk
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:
#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
ric <ricardo7 [at] gmail.com> 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
On 7 abr, 15:01, Maxwell Lol <nos... [at] com.invalid> wrote:
> ric <ricar... [at] gmail.com> 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
In article
<cf3e1b60-dd55-4e34-ab45-c8d715b03517 [at] 8g2000hse.googlegroups.com>,
ric <ricardo7 [at] gmail.com> wrote:
> On 7 abr, 15:01, Maxwell Lol <nos... [at] com.invalid> wrote:
> > ric <ricar... [at] gmail.com> 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 [at] alum.mit.edu
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***
Re: parsing-bash shell-awk
On Apr 7, 8:06 pm, Barry Margolin <bar... [at] alum.mit.edu> wrote:
> In article
> <cf3e1b60-dd55-4e34-ab45-c8d715b03... [at] 8g2000hse.googlegroups.com>,
>
> ric <ricar... [at] gmail.com> wrote:
> > On 7 abr, 15:01, Maxwell Lol <nos... [at] com.invalid> wrote:
> > > ric <ricar... [at] gmail.com> 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... [at] 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 :)