由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - [转载] a simple but weird question about the usage of "test" in RH6.2 !
相关主题
HELP, a question about the library path,what's wrong with this ftp batch file?
file problem in unixtwo emacs problems
Help: wrong operation; mv---->rm.Re: 为什么emacs自动给我加^M.
what is kernel lockinghelp on cxterm
how to configure networking after installation有关Unix shell script的问题
help me! Re: how to configure networking after installation一个关于命令行的小问题
how to change the date attribute of a fileHOW to get CPU and MEM usage?
how to use batch file to ftp files in UNIX?How to monitor a Unix workstation usage?
相关话题的讨论汇总
话题: test话题: echo话题: weird话题: usage话题: about
进入Unix版参与讨论
1 (共1页)
w********i
发帖数: 5
1
【 以下文字转载自 Linux 讨论区,原文如下 】
发信人: wenxiangli (Thrall), 信区: Linux
标 题: a simple but weird question about the usage of "test" in RH6.2 !
发信站: The unknown SPACE (Fri Dec 29 20:06:44 2000) WWW-POST
$1> set a="hello"
$2> set b #empty string
$3> test $a;echo $?
0
$4> test $b;echo $?
1
$5> test -n $a;echo $?
0
$6> test -n $b;echo $?
0 #?????????????!!!!!!!
$7> test -z $a;echo $?
1
$8> test -z $b;echo $?
0 #!!!
Could any DaXia give an explaination about
1 (共1页)
进入Unix版参与讨论
相关主题
How to monitor a Unix workstation usage?how to configure networking after installation
what is the cpu usage means in top/gtop?help me! Re: how to configure networking after installation
为什么有时用windows的telnet,每打一个字母会出现两个相同的字母呀?how to change the date attribute of a file
如何显示出“*”how to use batch file to ftp files in UNIX?
HELP, a question about the library path,what's wrong with this ftp batch file?
file problem in unixtwo emacs problems
Help: wrong operation; mv---->rm.Re: 为什么emacs自动给我加^M.
what is kernel lockinghelp on cxterm
相关话题的讨论汇总
话题: test话题: echo话题: weird话题: usage话题: about