On 02/27/2011 02:17 PM, yuanbx wrote:
My grep is grep 2.6.3, ubuntu 10.10
oo.txt such as
"Open Source" is a good mechanism to develop programs.
apple is my favorite food.
Football game is not use feet only.
The soup taste good.
I cant't finish the test.
google is the best tools for serch keyword.
goooooogle yes!
the symbol '*' is represented as start.
The world is the same with "glad".
However, this dress is about $3183 dollars.
You are the best is mean you are the no. 1.
gog dod fof ioi ror.
yuanbx@hp:~$ grep '[^g-z]oo' oo.txt
apple is my favorite food.
Football game is not use feet only.
yuanbx@hp:~$ grep '[^f-z]oo' oo.txt
yuanbx@hp:~$
See "Environment Variables" in the grep manual:
`LC_ALL'
`LC_COLLATE'
`LANG'
These variables specify the locale for the `LC_COLLATE' category,
which determines the collating sequence used to interpret range
expressions like `[a-z]'.
`LC_ALL'
`LC_CTYPE'
`LANG'
These variables specify the locale for the `LC_CTYPE' category,
which determines the type of characters, e.g., which characters
are whitespace.
Your use case would be "fixed" (but it's not a bug, really) by "export
LC_ALL=C".
Paolo