LinuxEye - Linux系统教程

LinuxEye - Linux系统教程

当前位置: 主页 > Linux命令 >

Linux expr命令参数及使用方法详解

时间:2012-03-25 20:49来源:www.linuxeye.com 编辑:LinuxEye 点击:
名称: 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 testfor
名称: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

转载请保留固定链接: https://linuxeye.com/command/expr.html

------分隔线----------------------------
标签:expr
栏目列表
推荐内容