---
title: "字符串处理"
author: "mactonish"
date: "2011-11-08T15:01:08Z"
tags: ["expr"]
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2011-11-08T15:53:51Z"
id: 1243338
url: "https://mactonish.iteye.com/blog/1243338"
---

expr index haohao ao
expr length hao,hao
expr substr hao,hao 2 3


[root@red54apple shell]# expr match "hao123" '[0-9]'  
0
[root@red54apple shell]# expr match "123" '[0-9]*'    
3
[root@red54apple shell]# expr match "123d" '[0-9]*
3
等价
[root@red54apple shell]# 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