📄 if.1
字号:
.th IF I 5/2/74.sh NAMEif \*- conditional command.sh SYNOPSIS.bd ifexpr command [ arg ... ].sh DESCRIPTION.it Ifevaluates the expression.it expr,and if its value istrue,executes the given.it commandwith the given arguments..s3The following primitives are used to constructthe.it expr:.s3.lp +13 13\fB\*-r\fR file true if the file exists and is readable..s3.lp +13 13\fB\*-w \fRfile true if the file exists and is writable..s3.lp +13 13s1 \fB= \fRs2 trueif the strings.it s1and.it s2are equal..s3.lp +13 13s1 \fB!= \fRs2 trueif the strings.it s1and.it s2are not equal..s3.lp +13 13\fB{ \fRcommand \fB}\fR The bracketed command isexecuted to obtain theexit status.Status zero is considered.it true.The command mustnotbe another.it if..s3.i0These primaries may be combined with thefollowing operators:.s3.lp +13 13\fB!\fR unary negation operator.s3.lp +13 13\fB\*-a\fR binary.it andoperator.s3.lp +13 13\fB\*-o\fR binary.it oroperator.s3.lp +13 13\fB( \fRexpr\fB )\fR parentheses for grouping..s3.i0.bd \*-ahas higher precedence than.bd \*-o.Notice that all the operators and flags are separatearguments to.it ifand hence must be surrounded by spaces.Notice also that parentheses are meaningfulto the Shell and must be escaped..sh "SEE ALSO"sh (I), find (I).sh BUGS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -