当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux 指令篇:字串处理--expr

Unix/Linux
Linux创建ADSL拨号上网方法
LINUX环境中配置WU-FTP服务器
Linux系统有效防御ARP攻击
linux sybase 安装全过程(写给初学者)
Sybase ASE数据库的常见问题解答
Linux中让进程在后台运行的方法
linux系统维护常见错误记录
CentOS支持reiserFS的设置方法
linux下安装Zend Optimizer的方法
linux内容批量替换的命令
linux vmstat输出方法解析
Smplayer播放wmv和avi的文件有箭头的问题解决方法
RHEL5 centos安装中文支持
linux构建动态WEB服务器安装篇
linux构建动态WEB服务器配置篇
Apache服务器优化方法小结
apache中并发控制参数prefork理解和调优
Gzip在apache2中的设置和squid对它的处理方法分析
apache Rewrite防盗链设置方法
linux下svn命令大全

Unix/Linux 中的 Linux 指令篇:字串处理--expr


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 61 ::
收藏到网摘: n/a

  名称: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