agrep gives incorrect output in some approximate searches
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
agrep (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
agrep sometimes finds a line under exact matching, but not under inexact matching. I couldn't come up with a small test case, but
http://
$ wget http://
[...]
$ agrep ^waterfal$ case #correct
waterfal
$ agrep -S1 ^waterfal$ case #should be identical to previous, but isn't
$ agrep -1 ^waterfal$ case #incorrect in last line
waterfall
waterval
aterfal
$ agrep ^aterfal$ case #as you can see here.
$
I'm also a bit confused by the relation between the version in Ubuntu and the version (3.41) at http://
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: agrep 4.17-7
ProcVersionSign
Uname: Linux 3.0.0-14-generic x86_64
NonfreeKernelMo
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Mon Jan 9 18:47:11 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110413)
ProcEnviron:
LC_COLLATE=C
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: agrep
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (87 days ago)
Hi Eric,
Hmm, yes this is a bit confusing,
I agree your 'agrep -S1' case is producing the wrong result, however in 4.17-9 the manpage says:
expressions. '
' -Sk Set the cost of a substitution to k (k is a positive integer). This option does not currently work with regular
so, I think that's just a limitation on agrep 4.17
I agree the -1 case is wrong to emit 'aterfal' since I agree it's nowhere in the input (and that's why I've confirmed it).
As for versions, yes, it's a mess, the 'homepage' listed in debian/control points to http:// freshmeat. net/projects/ agrep whcih points to the 2.04 version ftp://ftp. cs.arizona. edu/agrep/
The package has a 4.17 source tar and from what I can see it comes from http:// wftp.tu- chemnitz. de/pub/ Local/urz/ ding/contrib/ SRPMS/agrep- 4.17-1. src.rpm that was suggested in the following debian bug
http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 307442
but as you say the printed version number is completely inconsistent in that source.