歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux命令 >> Linux expr命令參數及使用方法詳解

Linux expr命令參數及使用方法詳解

日期:2017/2/27 16:38:27   编辑:Linux命令
名稱: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
Copyright © Linux教程網 All Rights Reserved