shell:str=teststring; ${teststring:0:4}的值是多少?请指点

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
CS772421东
帖子: 310
注册时间: 2007-11-19 11:21
来自: 广东,东莞,来自www.58zn.cn魅力linux
联系:

shell:str=teststring; ${teststring:0:4}的值是多少?请指点

#1

帖子 CS772421东 » 2007-12-09 23:59

shell:
str=teststring; ${teststring:0:4}的值是多少
请高手指点
我的博客网站http://www.58zn.cn魅力Linux
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

#2

帖子 bones7456 » 2007-12-10 9:16

搞错了吧,这样才有点意义:
$ str=teststring; echo ${str:0:4}
test
关注我的blog: ε==3
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#3

帖子 eexpress » 2007-12-10 9:23

估计这个也是个变量哦。
排骨。哈哈。
● 鸣学
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

#4

帖子 bones7456 » 2007-12-10 9:25

那给的信息不全,我也没辙了.
关注我的blog: ε==3
回复