关于sed的疑问 (又是 locale 对字符排序的影响)

除了将 LC_ALL 设成 C 之外, 还可以采用如下方法:
引用:
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=26039 $?=0] ; cat /etc/redhat-release
Red Hat Linux release 9 (Shrike)
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=26039 $?=0] ; sed --version
GNU sed version 4.0.5
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=26039 $?=0] ; 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=
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=26039 $?=0] ; cat wk
northwest NW Joel Craig 3.0 .98 3 4
western WE Sharon Kelly 5.3 .97 5 23
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=26039 $?=0] ; sed 's/ \([A-Z][a-z]\+\) \([A-Z][a-z]\+\) / \2 \1 /g' wk
northwest Joel NW Craig 3.0 .98 3 4
western Sharon WE Kelly 5.3 .97 5 23
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=26039 $?=0] ; sed 's/ \([[:upper:]][[:lower:]]\+\) \([[:upper:]][[:lower:]]\+\) / \2 \1 /g' wk
northwest NW Craig Joel 3.0 .98 3 4
western WE Kelly Sharon 5.3 .97 5 23
-(dearvoid@LinuxEden:Forum)-(~/tmp)-
[$$=26039 $?=127] ; bye
      
参考精华贴: locale 对字符排序的影响      
版主很强悍啊!
看样子要学的东西太多了.