-rw-r--r-- 1 oracle oinstall 2653 Feb 23 21:30 awk.out
-rwxr--r-- 1 oracle oinstall 2250 Feb 23 21:20 awk.sh
-rw-r--r-- 1 oracle oinstall 216 Feb 23 11:53 blank_file
-rwxr--r-- 1 oracle oinstall 642 Feb 15 18:43 find.sh
drwxr-xr-x 2 oracle oinstall 4096 Feb 15 17:56 folder
-rw-r--r-- 1 oracle oinstall 620 Feb 24 14:21 ls.out
-rw-r--r-- 1 oracle oinstall 620 Mar 2 14:00 ls.out2
-rwxr-xr-x 1 oracle oinstall 26 Nov 10 22:30 main.sh
-rw-r--r-- 1 oracle oinstall 13956 Mar 6 21:49 orclsid_ora_31518_lubinsu.out
-rw-r--r-- 1 oracle oinstall 608 Mar 3 14:48 result.out
drwxr-xr-x 2 oracle oinstall 4096 Feb 25 22:10 sed.folder
-rwxrwxrwx 1 oracle oinstall 44 Jan 7 22:39 shelltest.sh
drwxr-xr-x 2 oracle oinstall 4096 Mar 3 12:14 sort.folder
-rwxr-xr-x 1 oracle oinstall 99 Feb 23 11:51 test1.sh
-rwxr-xr-x 1 oracle oinstall 99 Feb 23 11:52 test2.sh
drwxr-xr-x 2 oracle oinstall 4096 Mar 3 15:07 tr.folder
[oracle@localhost testDir]$ ll awk
ls: awk: No such file or directory
[oracle@localhost testDir]$ ls -l awk.out
-rw-r--r-- 1 oracle oinstall 2653 Feb 23 21:30 awk.out
[oracle@localhost testDir]$ [ -w awk.out ]
[oracle@localhost testDir]$ echo $?
0
[oracle@localhost testDir]$ [ -x awk.out ]
[oracle@localhost testDir]$ echo $?
1
[oracle@localhost testDir]$ test -x awk.out
[oracle@localhost testDir]$ echo $?
1
[oracle@localhost testDir]$ test -d folder
[oracle@localhost testDir]$ echo $?
0
[oracle@localhost testDir]$
[oracle@localhost testDir]$ test -u test1.sh
[oracle@localhost testDir]$ echo $?
1
[oracle@localhost testDir]$ [ -x test1.sh -a -w test2.sh ]
[oracle@localhost testDir]$ echo $?
0
[oracle@localhost testDir]$ [ -w result.out -a -x result.out ]
[oracle@localhost testDir]$ echo $?
1
[oracle@localhost testDir]$ [ -w result.out -o -x result.out ]
[oracle@localhost testDir]$ echo $?
0
[oracle@localhost testDir]$ [ -z $EDITOR ]
[oracle@localhost testDir]$ echo $?
0
[oracle@localhost testDir]$ [ $EDITOR = "vi" ]
-bash: [: =: unary operator expected
[oracle@localhost testDir]$ [ $EDITOR = "vi" ]
-bash: [: =: unary operator expected
[oracle@localhost testDir]$ [ $EDITOR = "vi" ]
-bash: [: =: unary operator expected
[oracle@localhost testDir]$ echo $EDITOR
[oracle@localhost testDir]$ testStr=vi
[oracle@localhost testDir]$ echo $testStr
vi
[oracle@localhost testDir]$ [ $testStr = "vi" ]
[oracle@localhost testDir]$ echo $?
0
[oracle@localhost testDir]$ [ $testStr = "v" ]
[oracle@localhost testDir]$ echo $?
1
[oracle@localhost testDir]$ expr 10 + 10
20
[oracle@localhost testDir]$ expr 10 + 100
110
130310
[oracle@localhost testDir]$ var1=`date +%Y%m%d`
[oracle@localhost testDir]$ echo ${var1}
20130310
[oracle@localhost testDir]$ expr ${var1}+1
20130310+1
[oracle@localhost testDir]$ expr ${var1} + 1
20130311
[oracle@localhost testDir]$ loop=1
[oracle@localhost testDir]$ loop=`expr ${loop} + 1`
[oracle@localhost testDir]$ echo ${loop}
2
--模式匹配功能
[oracle@localhost testDir]$ var2=word.doc
[oracle@localhost testDir]$ expr $var2 : '\(.*\).doc'
word
分享到:
相关推荐
软件测试中的边界条件测试 边界条件测试是一个软件测试中的重要步骤,它的主要目标是设计测试用例,以边界情况的处理为主要目标。边界条件测试是单元测试中最重要的一项任务,软件经常在边界上失效,因此边界条件...
linux shell 条件测试
条件测试说明条件测试说明条件测试说明条件测试说明条件测试说明条件测试说明
shell 基本知识,包括控制结构,条件测试,通配符,引号等
Draxler和Zessin [1]推导了一类假设为Rasch模型的心理测验模型的条件测试的功效函数,并建议了由Verhelst [2]开发的MCMC方法,用于对功效的数值近似。 在此贡献中,对Verhelst方法的精度进行了研究,并将其与Miller...
使用符合条件测试
本文介绍了单元测试(1 模块接口测试;2 模块局部数据结构测试;3模块中所有独立执行通路测试 ;4 模块的各条错误处理通路测试;5 模块边界条件测试。)中应该注意的重点
shell中条件测试.docx
26 条件测试及if语句.mp4
Linux详细教程大全之shell脚本基础2-条件测试及控制流
七年级数学探索三角形全等的条件测试题.doc
Bash条件测试之文件测试–a/E FILE:存在文件为真练习:存在文件显示文件行数,不存在显示不存在–d FILE:存在且为目录文件为真–f FILE:存在且
5.2: 条件测试 、 if选择结构 、 循环结构 、 总结和答疑.docx
本文将从单元测试的定义、 importance、步骤、模块接口测试、局部数据结构测试、路径测试、边界条件测试、错误处理测试、代码书写规范等方面进行详细的解释。 单元测试的定义 ---------------- 单元测试是指对软件...
详细地介绍测试用例总结,边界条件《软件测试实用技术与常用模板》作者李龙 教材中附赠
学生信息管理系统测试计划方案 概述 学生信息管理系统测试计划方案旨在确保学生信息管理系统的质量和可靠性,通过详细的测试计划和实施,...测试出入口条件旨在确保测试工作的完成,确保系统达到预期的质量和可靠性。
一、条件测试操作 要使Shell脚本程序具备一定的“智能”,面临的第一个问题就是如何区分不同的情况以确定执行何种操作。Shell环境根据命令执行后的返回状态值(¥?)来判断是否执行成功,当返回值为0时表示成功,...
目录 一 软件测试 从零开始 5 1.1 引言 5 1.2 测试准备工作 5 1.2.1 向有经验的测试人员学习 5 1.2.2 阅读软件测试的相关...16.5.1 条件测试 108 16.5.2 数据流测试 110 16.5.3 循环测试 111 16.6 黑盒测试 112
停止测试的条件 测试的基本文档包括哪些 简要的说明一下软件工程中的V模型 为什么要开展测试工作 测试团队在项目中的基本责任是什么 软件缺陷的定义是什么 软件错误的分类有哪些 一个优秀的测试工程师需要具备的素质...
在软件测试三角形问题中,主要有四种覆盖测试方法:语句覆盖测试、判定覆盖测试、分支条件测试和分支条件组合测试。语句覆盖测试是指测试程序中的每一条可执行语句至少执行一次;判定覆盖测试是指使程序中的每个判定...