当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux 指令篇:字串处理--expr

Unix/Linux
Linux 指令篇:网络通讯--setserial
Linux 指令篇:网络通讯--shapecfg(shaper configuration)
Linux 指令篇:网络通讯--smbd
Linux 指令篇:网络通讯--statserial
Linux 指令篇:网络通讯--tcpdump
Linux 指令篇:网络通讯--testparm
Linux 指令篇:网络通讯--traceroute
Linux 指令篇:网络通讯--tty
Linux 指令篇:网络通讯--uuname
Linux 指令篇:网络通讯--ytalk
Linux 指令篇:系统管理--exit
Linux 指令篇:系统管理--free
Linux 指令篇:系统管理--fwhois
Linux 指令篇:系统管理--gitps
Linux 指令篇:系统管理--groupdel
Linux 指令篇:系统管理--groupmod
Linux 指令篇:系统管理--id
Linux 指令篇:系统管理--kill
Linux 指令篇:系统管理--lastb
Linux 指令篇:系统管理--login

Unix/Linux 中的 Linux 指令篇:字串处理--expr


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 118 ::
收藏到网摘: n/a

  名称:expr 

### 字串长度

shell>> expr length "this is a test"
14

### 数字商数

shell>> expr 14 % 9
5

### 从位置处抓取字串

shell>> expr substr "this is a test" 3 5
is is

### 数字串 only the first character

shell>> expr index "testforthegame" e
2

### 字串真实重现

shell>> expr quote thisisatestformela
thisisatestformela