GB | BIG5
|
| 首頁 > 系統管理 > Linux > 正文 |
 |
| Linux 指令篇:字串處理--expr |
| http://linuxfab.cx/ (2001-04-30 14:27:05) |
名稱: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
(http://www.fanqiang.com)
進入【UNIX論壇】
|
|
| 相關文章 |
Linux 指令篇:字串處理--tr (2001-04-30 14:27:44) Linux 指令篇:字串處理--expr (2001-04-30 14:27:05)
|
|
|
|
 |
★ 樊強制作 歡迎分享 ★ |