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

Unix/Linux
linux php扩展安装方法
Linux上架设支持JSP+PHP的Web服务器
FreeBSD WEB服务器架设笔记
Linux下Web服务器架设攻略
Apache配置技巧
在 Linux 上安装 PostgreSQL
文件属性控制命令chmod
解决安装Domino for Linux时配置的Web服务器无法启动的问题
在Linux下配置和安装Domino 服务器的问题
Linux下配置和安装Domino 服务器 2
Linux下配置和安装Domino 服务器 3
Linux编译内核
I810 Graphics LINUX Driver的安装
在Linux下如何使用软盘、光盘等分区
建立并安装一个定制的内核
中小型企业的Sendmail邮件服务器应用实例
Linux下 Sendmail服务器 转发功能的讲解
linux下文件解压
配置Sendmail服务器以防治垃圾邮件
配置Sendmail服务器以防治垃圾邮件 2

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


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