GNU coreutils 8.26
manpages-zh
Chinese manual pages
man-pages-zh-CN
Chinese Man Pages from Chinese Man Pages Project
man-pages-zh_cn
Simplified Chinese Linux man pages
coreutils
The basic file, shell and text manipulation utilities of the GNU operating system
coreutils-common
coreutils common optional components
coreutils-doc
Documentation for the GNU Core Utilities
名称
expr - 对表达式求值
概述
expr \,表达式\/
expr \,选项\/
expr \,选项\/
描述
--help | 显示此帮助信息并退出 |
--version | |
显示版本信息并退出 | |
将表达式的值打印至标准输出。以下说明以空行分隔优先级级别,运算优先级从低到高。表达式可能为: | |
参数1 | 参数2 | |
如果参数1 既不是 null 也不是 0,则为参数1,否则为参数2 | |
参数1 & 参数2 | |
如果两个参数都不是 null 也不是 0,则为参数1,否则为 0 | |
参数1 < 参数2 | |
参数1 小于参数2 | |
参数1 <= 参数2 | |
参数1 小于或等于参数2 | |
参数1 = 参数2 | |
参数1 等于参数2 | |
参数1 != 参数2 | |
参数1 不等于参数2 | |
参数1 >= 参数2 | |
参数1 大于或等于参数2 | |
参数1 > 参数2 | |
参数1 大于参数2 | |
参数1 + 参数2 | |
参数1 和参数2 的代数和 | |
参数1 - 参数2 | |
参数1 和参数2 的代数差 | |
参数1 * 参数2 | |
参数1 和参数2 的代数乘积 | |
参数1 / 参数2 | |
参数1 除以参数2 的代数商 | |
参数1 % 参数2 | |
参数1 除以参数2 所得余数 | |
字符串 : 正则表达式 | |
在字符串中由给定正则表达式决定的锚定模式匹配 | |
match 字符串 正则表达式 | |
与”字符串 : 正则表达式“相同 | |
substr 字符串 位置 长度 | |
字符串的子串,位置由 1 开始计数 | |
index 字符串 CHARS | |
任何能够在字符串中找到的 CHARS 的位置,或者 0 | |
length 字符串 | |
字符串 的长度 | |
+ TOKEN | |
将 TOKEN 视作字符串,即使它是一个 | |
类似于 ’match’ 的关键字或是一个类似 ’/’ 的操作符 | |
( 表达式 ) | |
表达式 的值 |
如果 表达式 既不是 null 也不是 0,则返回状态值为 0;如果 表达式 是 null 或 0,则返回状态值为 1;如果 表达式 在语法上无效,则返回状态值为 1;如果发生错误,则返回状态值为 3。
作者
由 Mike Parker, James Youngman 和 Paul Eggert 编写。
报告错误
GNU coreutils 的在线帮助: <http://www.gnu.org/software/coreutils/>
请向 <http://translationproject.org/team/zh_CN.html> 报告 expr 的翻译错误。
请向 <http://translationproject.org/team/zh_CN.html> 报告 expr 的翻译错误。
版权
Copyright © 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
参见
完整文档请见: <http://www.gnu.org/software/coreutils/expr>
或者在本地使用: info \(aq(coreutils) expr invocation\(aq
或者在本地使用: info \(aq(coreutils) expr invocation\(aq
跋
本页面中文版由中文 man 手册页计划提供。
中文 man 手册页计划:https://github.com/man-pages-zh/manpages-zh
中文 man 手册页计划:https://github.com/man-pages-zh/manpages-zh