UNIX中的另一组重要操作符是逻辑操作符。
Another important set of operators in UNIX is the logical operators.
可以用括号和逻辑操作符把test命令支持的测试组合起来。
You can combine tests that are allowed for the test command using parentheses and logical operators.
考虑使用括号来改善可读性和避免由于逻辑操作符的优先级导致的错误。
Consider using parentheses to improve readability and avoid mistakes because of logical operator precedence.
尽管和[]在运算期间使用相同的测试操作符,但是它们使用不同的逻辑操作符。
Although and [] use the same test operators during evaluation, they use different logical operators.
你可以使用带有与和或逻辑操作符的过滤器,以及通配符来发现你的缺陷。
You can use the filter with AND and OR operators, and wildcard to find your bugs.
如果您读过我以前的文章(参见参考资料),就会注意到我喜欢使用逻辑操作符,而不是编写多行代码。
If you've read any of my previous articles (see Resources), you'll notice that I favor logical operators over writing several lines of code.
因此,确实要使用这些词汇进行匹配时,我们需要采用显式执行方式,将这个词汇作为必要词汇或与一个逻辑操作符组合使用。
Applying such terms for a match might therefore need an explicit enforcement as a required term or need a combination with a Boolean operator.
只需使用exit_msg这样的简单函数和几个逻辑操作符,这个脚本就可以简化成更漂亮更容易理解的程序,见清单14。
By using a simple function like exit_msg and a few logical operators, the script could be condensed into the better-looking and easier-to-understand program shown in Listing 14.
要在对这样的情况使用更多选择的匹配,需要在搜索关键词中使用强制操作符(+)或显式的逻辑操作符(AND)。
To get a more selective match for such cases, use either the enforce operator (+) or an explicit Boolean operator (AND) in the keyword search.
下一步骤是选择逻辑AND或OR操作符和第二个参数。
The next step is to choose the logical and or or operator and a second parameter.
因为执行计划中的逻辑流是自下而上、从左到右,所以看此类执行计划时,最好是从树中左下方的操作符开始。
It's best to read such execution plans from the left-lowest operator in the tree, since the logical flow in the plan is from bottom to top and left to right.
如果使用逻辑| |操作符,Perl就会使用后面的第一个真值,顺序从左到右取值。
If you use the logical | | operator, Perl will use the first true value it comes across, in order, from left to right.
这是常用的 or逻辑;它是一个函数,而不是一个操作符。
This is the normal logical or are used to; it's just a function, not an operator.
您了解了如何把数据重定向到stdin或stdout,如何使用管道,以及如何在UNIX中使用操作符;这些都有助于您编写出更强大的脚本,更好地捕捉错误,使逻辑更简洁清晰。
Knowing how to redirect data as stdin or stdout, how to use the pipe, and how to use operators in UNIX helps you write more powerful scripts with better error trapping and cleaner logic.
注意如果要指定一个逻辑运算搜索,操作符必须使用大写字母表示。
Note that to indicate a Boolean connection, the operator must appear in uppercase letters.
在ksh (aix中使用的默认shell)中,以及UNIX和Linux使用的其他shell中,一定要知道如何使用测试、逻辑和替换操作符。
In KSH, the default shell used in AIX, as well as other shells used in UNIX and Linux, it's important to know how to use test, logical, and substitution operators.
不管怎样,数学操作符是不仅仅是你给出的操作符。有一些布尔型的操作符还能够帮助你用合理的思路或合理的逻辑判定。
However, mathematical operators are not the only operators you are given. There are Boolean operators to help you with logical circuits or logical decisions.
不管怎样,数学操作符是不仅仅是你给出的操作符。有一些布尔型的操作符还能够帮助你用合理的思路或合理的逻辑判定。
However, mathematical operators are not the only operators you are given. There are Boolean operators to help you with logical circuits or logical decisions.
应用推荐