Re: grep: match i to j occurences of abc
From: Erik Max Francis (max_at_alcyone.com)
Date: 08/30/03
- Previous message: Kurt J. Lanza: "Re: grep: match i to j occurences of abc"
- In reply to: Kurt J. Lanza: "Re: grep: match i to j occurences of abc"
- Next in thread: Penna Elabi: "Re: grep: match i to j occurences of abc"
- Reply: Penna Elabi: "Re: grep: match i to j occurences of abc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Aug 2003 14:17:55 -0700
"Kurt J. Lanza" wrote:
> Grep is the wrong tool. You are trying to match between 3 and 5
> occurrences of the letter 'c'. That's why the man page refers to a
> 'character'. (Duh.) Try 'awk' instead. I'm much to lazy to figure out
> the details.
It works fine with a pattern and egrep; on the contrary, grep is exactly
the right tool for the job. (Duh on you.) The regular expression he
wants is:
grep '^(abc ?){3,5}$' test
-- Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/ __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE / \ I'm the woman whose / Three wishes came true \__/ Lamya
- Previous message: Kurt J. Lanza: "Re: grep: match i to j occurences of abc"
- In reply to: Kurt J. Lanza: "Re: grep: match i to j occurences of abc"
- Next in thread: Penna Elabi: "Re: grep: match i to j occurences of abc"
- Reply: Penna Elabi: "Re: grep: match i to j occurences of abc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|