摘要:
#! /bin/ash#read string from filefilecon=$(cat /root/surces/tmp/scrtxt) #get string follow ";DES:" filename=${filecon#*;DES:} if [ ${#filecon} == ${#filename} ] #string lenththen echo "no match" exit 1ficutpos=$(expr index "$filename" ';') #get positionlet cutpos=cutpos-1filename=${filename:0:$cutpo
阅读全文
posted @ 2011-01-05 16:16
海王
阅读(2257)
推荐(0)
摘要:
http://blog.chinaunix.net/u2/80710/showart_1933974.html
阅读全文
posted @ 2011-01-05 12:07
海王
阅读(605)
推荐(0)
摘要:
http://www.linuxidc.com/Linux/2010-12/30564.htm 写Bash Shell脚本,大小写转换通常这样做: str="This is a Bash Shell script." newstr=`tr '[A-Z]' '[a-z]' "$str"` 今天看bash的man page,发现有更简单的方法 转小写,只需要将变量名字declare -...
阅读全文
posted @ 2011-01-05 12:02
海王
阅读(21634)
推荐(0)