Re: Grep on dictionary words
On Sun, Nov 29, 2009 at 01:22:15AM +0200, Dotan Cohen wrote:
> > will get the ones that start with capital alphas. if you want initial
> > caps *only* then:
> >
> > grep "^[A-Z][a-z]*$"
> >
> > would match those.
> >
>
> Thanks. I meant that caps could only be at the beginning of a word,
> not in the middle. Expanding your example, I figured that would be:
> grep "^[A-Z]?[a-z]*$" // note the question mark
That's clearly a false statement. Here's a snippet from 'strings
/bin/false'
[]A\A]A^A_
fffff.
l$ L
t$(L
|$0H
Usage: %s [ignored command line arguments]
or: %s OPTION
Exit with a status code indicating failure.
--help display this help and exit
--version output version information and exit
NOTE: your shell may have its own version of %s, which usually
supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.
false
Report bugs to <%s>.
bug-coreutils@gnu.org
/usr/share/locale
--help
--version
Jim Meyering
6.10
GNU coreutils
%s (%s) %s
%s
Written by %s.
Written by %s and %s.
Written by %s, %s, and %s.
--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend
Reply to: