[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep: why doesn't ':alpha:' work
From: |
Matthew Woehlke |
Subject: |
grep: why doesn't ':alpha:' work |
Date: |
Thu, 04 Jan 2007 10:41:19 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061206 Thunderbird/1.5.0.9 Mnenhy/0.7.4.0 |
While trying to reply to swiftguy's question, I noticed something odd...
$ echo foo | grep '[:lower:]'
foo
$ echo foo | grep '[:alpha:]'
$ echo FOO | grep '[:alpha:]'
$ echo FOO | grep '[:upper:]'
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ echo foo | LC_ALL=C grep '[:alpha:]'
$ echo FOO | LC_ALL=C grep '[:alpha:]'
$ echo FOO | LC_ALL=C grep '[:upper:]'
$ grep --version
grep (GNU grep) 2.5.1
[snip]
Am I doing something wrong...?
--
Matthew
Caution: keep out of reach of adults.
- grep: why doesn't ':alpha:' work,
Matthew Woehlke <=