Date: Sat, 17 Jul 1999 08:07:00 -0700 To: gvelez@iwhome.com From: michael@otto.com Subject: Website response For: = WG Bug Report EMAIL = michael@otto.com Version = glimpse 4.12.3, agrep 3.0 OS = Linux/Solaris Desc = agrep/glimpse bug report ======================== Reported by: Michael Otto - refers to agrep V3.0, 1994 (the current one!) - refers to all glimpse versions that are based on this agrep version (all current ones) - refers to Linux and Solaris build (I haven't tested other builds) Symptom: agrep and glimpse with use of delimiter strings lose some matching records. I traced this down to a bug in agrep. Sample text file (save as "sample.txt"): _XOX_ some first sample some further text _XOX_ some unique sample some more test stuff _XOX_ --- Description: Save the above file as "sample.txt". Obviously, I want "_XOX_" to be the delimiter of a record. Now try: agrep -i "unique;sample" sample.txt works fine, right? Now try: agrep -d "^_XOX_" -i "unique;sample" sample.txt This produces *no output*, though it should. Now it gets even more peculiar. Try this one: agrep -n -d "^_XOX_" -i "unique;sample" sample.txt This should be the same as above, just that it prints the number of the record before the record. But this time it works! The record is found and printed correctly! But -n is slower than the version above. Comments = ================================================================== I was able to repro this bug with a very simple sample.txt file: -------------------- stuff unique sample more stuff -------------------- and the command line agrep -d "\t" -i "unique;sample" sample.txt this failed whether or not there were actually tabs in the file. --G