Public bug reported:

Binary package hint: grep

i wanted to find all 6-letter words starting with 'sho' and ending with
's'.  should be simple enough, so i tried:

$ egrep '^sho.{2}s$' /usr/share/dict/words
shoals
shocks
shoe's
shoots
shop's
shores
shorts
shot's
shouts
shoves

then wanting to remove the words with apostrophes from the list, i
tried:

$ egrep '^sho[:alpha:]{2}s$' /usr/share/dict/words
shoals

yikes! what happen to the other words? then out of curiosity i tried a
few more things:

$ egrep '^sho[:lower:]{2}s$' /usr/share/dict/words
shores

using [:lower:] also only matched one word...but a different one.  same
for [:upper:] which should have matched none.

$ egrep '^sho[:upper:]{2}s$' /usr/share/dict/words
shores

unless i am using this command wrong (possible, i am no expert here)
this seems like a bug either in code or documentation about how the
command is to work.

Some system info:

$ lsb_release -rd
Description:    Ubuntu 8.04.1
Release:        8.04

$ uname -a
Linux tinyturd 2.6.24-19-openvz #1 SMP Sat Jul 12 05:02:33 UTC 2008 i686 
GNU/Linux

$ apt-cache policy grep
grep:
  Installed: 2.5.3~dfsg-3
  Candidate: 2.5.3~dfsg-3
  Version table:
 *** 2.5.3~dfsg-3 0
        500 http://us.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

$ apt-cache policy dictionaries-common
dictionaries-common:
  Installed: 0.90.0ubuntu2
  Candidate: 0.90.0ubuntu2
  Version table:
 *** 0.90.0ubuntu2 0
        500 http://us.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status
[EMAIL PROTECTED]:~

** Affects: grep (Ubuntu)
     Importance: Undecided
         Status: New

-- 
egrep not selecting all possible matches
https://bugs.launchpad.net/bugs/250403
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to