[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems using + with -f <file>
From: |
Gert Jan van Loo |
Subject: |
Problems using + with -f <file> |
Date: |
Tue, 11 Jul 2006 08:26:25 -0700 |
My source contains many of:
Input rstn is unused
Input location is unused
Input rstn is unused
Input n is unused
My pattern file contains (among other lines):
Input [a-zA-Z0-9_]+ is unused
If I use "grep -f <patternfile> <source>" The patterns are NOT found
If I use "egrep -f <patternfile> <source>" The patterns ARE found
If I change my pattern file to:
Input [a-zA-Z0-9_]\+ is unused
Now using "grep -f <patternfile> <source>" The patterns ARE found.
Now using "egrep -f <patternfile> <source>" The patterns are NOT found.
egrep seems to do the right thing.
I thought "[a-zA-Z0-9_]+" is part of the standard grep.
Even if it is not why does \+ suddenly work?
Version:
grep (GNU grep) 2.5.1
on Linux Redhat.
- G.J. van Loo
- Principle ASIC Engineer Broadcom Ltd.