Chinaunix

标题: 不知道有没有人发现这个问题 [打印本页]

作者: linycobie    时间: 2013-04-12 09:30
标题: 不知道有没有人发现这个问题
  1. $ cat data
  2. 1Asia
  3. 2aSia
  4. 3ASIA
  5. 4asIA
  6. 5
  7. 6
  8. 7
  9. 8
  10. 9
  11. 10
  12. $ awk '/[0-9][a-z]/' data
  13. 1Asia
  14. 2aSia
  15. 3ASIA
  16. 4asIA
  17. $ awk '/[0-9][A-Z]/' data
  18. 1Asia
  19. 3ASIA
复制代码
$ awk --version
GNU Awk 3.1.8
Copyright (C) 1989, 1991-2010 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.

作者: pix77    时间: 2013-04-12 09:33
# awk '/[0-9][a-z]/' data
2aSia
4asIA
# awk --version
GNU Awk 4.0.2
Copyright (C) 1989, 1991-2012 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
#

作者: yestreenstars    时间: 2013-04-12 09:33
早就有人发现咯~
@seesea2517
作者: linycobie    时间: 2013-04-12 09:37
回复 3# yestreenstars
唉,昨天还以为自己眼花了。。。


   
作者: waker    时间: 2013-04-12 09:43
加上LANG=C再试试
作者: pix77    时间: 2013-04-12 09:51
回复 3# yestreenstars
不要打击人家啦


   
作者: seesea2517    时间: 2013-04-12 17:36
回复 3# yestreenstars


    哈哈,再早的不是我,你别拉我下水。
作者: isohybrid    时间: 2013-04-12 18:43
搽,很好奇,怎么会这样呢?
作者: 惟吾无为    时间: 2013-04-12 18:52
waker 发表于 2013-04-12 09:43
加上LANG=C再试试
我也是这么想的。
作者: yestreenstars    时间: 2013-04-12 23:14
回复 7# seesea2517


    你之前不是也发过一个类似的吗~
作者: seesea2517    时间: 2013-04-13 22:42
回复 10# yestreenstars


    好吧,是有。抓住不放了,我只好承认。
作者: yestreenstars    时间: 2013-04-14 01:01
回复 11# seesea2517


   




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2