[buug] grep weirdness

Ian Zimmerman itz at speakeasy.org
Tue May 21 08:33:37 PDT 2002


Claude> grep -ftmp mrw

Claude> where

Claude> tmp is a single-column file (there's a tab character at the end of each
Claude> line):
Claude> ^CASEID
Claude> ^1
Claude> ^2
Claude> ^3
Claude> ...
Claude> ^8916

Claude> and

Claude> mrw is a two-column file delimited by a single tab:
Claude> CASEID	relative_person_weight
Claude> 1	2.2096
Claude> 2	1.25369
Claude> 3	0.734946
Claude> ...	...
Claude> 8916	0.701728

Any reason why tmp cannot be simply the following?

^CASEID	
^[0-9]+	

And, given that _all_ records of your sample file seem to match the
one of the original regexes, what problem are you really trying to
solve here?

-- 
Ian Zimmerman, Oakland, California, U.S.A.
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.




More information about the buug mailing list