Linux指令篇:字串处理--expr
点击次数:5 次 发布日期:2008-11-29 14:01:37 作者:源代码网
|
源代码网推荐 源代码网推荐 名称: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 源代码网推荐 源代码网推荐 源代码网推荐 源代码网推荐 源代码网供稿. |
