Chinaunix首页 | 论坛 | 博客
  • 博客访问: 91311320
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-03-19 18:49:13

指令名称:expr
功能介绍:可以对字符串进行各种处置
语法格式:expr
常用参数说明:
指令使用实例:
1.字串长度
  shell>> expr length "this is a test"
  14
2.数字商数
  shell>> expr 14 % 9
  5
3.从位置处抓取字串
  shell>> expr substr "this is a test" 3 5
  is is
4.数字串 only the first character
  shell>> expr index "testforthegame" e
  2
5.字串真实重现
  shell>> expr quote thisisatestformela
  thisisatestformela
阅读(447) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~