expr index haohao ao
expr length hao,hao
expr substr hao,hao 2 3
# expr match "hao123" '[0-9]'
0
# expr match "123" '[0-9]*'
3
# expr match "123d" '[0-9]*
3
等价
# expr 123 : [0-9]*
3
awk 'BEGIN {while ( "who" | getline n ) print n" haha"}'
参看
http://www.mscto.com/embedded/2009020229747.html
http://www.blogjava.net/xzclog/default.html?page=4
expr length hao,hao
expr substr hao,hao 2 3
# expr match "hao123" '[0-9]'
0
# expr match "123" '[0-9]*'
3
# expr match "123d" '[0-9]*
3
等价
# expr 123 : [0-9]*
3
awk 'BEGIN {while ( "who" | getline n ) print n" haha"}'
参看
http://www.mscto.com/embedded/2009020229747.html
http://www.blogjava.net/xzclog/default.html?page=4