Re: Grep Text File for Lines Containing 1 or 2 Words
From: Buck Turgidson (jc_va_at_hotmail.com)
Date: 01/26/05
- Next message: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Previous message: Martin Kissner: "Re: Negative lookahead regex clarification needed"
- In reply to: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Next in thread: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Reply: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Reply: A. Sinan Unur: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 Jan 2005 21:10:24 -0500
awk 'NF && NF <= 2' FILENAME
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrncvdrip.5i2.tadmc@magna.augustmail.com...
> Buck Turgidson <jc_va@hotmail.com> wrote:
> > Looking for help in writing a perl that will pull from a text file those
> > lines containing one or two "words". I want to reject any line that
> > contains more than 2 words (a sentence).
> >
> > Appreciate any help from text processing experts.
>
>
> Show us the code you have so far, and we will help you fix it.
>
>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
- Next message: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Previous message: Martin Kissner: "Re: Negative lookahead regex clarification needed"
- In reply to: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Next in thread: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Reply: Tad McClellan: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Reply: A. Sinan Unur: "Re: Grep Text File for Lines Containing 1 or 2 Words"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|