摘要: 1.t e s t一般有两种格式,即:test condition或[ c o n d i t i o n ]使用方括号时,要注意在条件两边加上空格。2.文件测试-d 目录 -s文件长度大于0、非空 -f正规文件 -w可写 -L符号连接 -u文件有s u i d位设置 -r可读 -x可执行3.逻辑操作符-a 逻辑与,操作符两边均为真,结果为真,否则为假。-o 逻辑或,操作符两边一边为真,结果为真,否则为假。! 逻辑否,条件为假,结果为真。4.字符串测试(1)test “str” (2)test str_opt “str” (3)test “str1” str_opt... 阅读全文
posted @ 2012-04-05 22:11 望月追忆 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 文件内容是:111222ABCABCABCabcabcabc444555我想匹配出现3次ABC的行如何写正则表达式? 阅读全文
posted @ 2012-04-05 21:29 望月追忆 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>int main(void){ printf("hello\n"); printf("I am mini2440. And Wish you be a best man!\n"); return 0;}int main(void){ printf("hello\n"); printf("I am mini2440. And Wish you be a best man!\n"); return 0;}intintint main(void){ printf(" 阅读全文
posted @ 2012-04-05 10:25 望月追忆 阅读(279) 评论(0) 推荐(0) 编辑