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

Unix/Linux
Linux 指令篇:网络通讯--smbclient(samba client)
Linux 指令篇:网络通讯--smbd(samba deamon)
Linux 指令篇:网络通讯--telnet
Linux 指令篇:网络通讯--uulog
Linux 指令篇:网络通讯--uustat
Linux 指令篇:网络通讯--uux
Linux 指令篇:网络通讯--cu
Linux 指令篇:网络通讯--dnsconf
Linux 指令篇:网络通讯--efax
Linux 指令篇:网络通讯--httpd
Linux 指令篇:网络通讯--ifconfig
Linux 指令篇:网络通讯--minicom
Linux 指令篇:网络通讯--mesg
Linux 指令篇:网络通讯--nc
Linux 指令篇:网络通讯--netconf
Linux 指令篇:网络通讯--netconfig
Linux 指令篇:网络通讯--netstat
Linux 指令篇:网络通讯--ping
Linux 指令篇:网络通讯--pppstats
Linux 指令篇:网络通讯--samba

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 123 ::
收藏到网摘: 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