![if --help 在终端中不起作用](https://linux22.com/image/166199/if%20--help%20%E5%9C%A8%E7%BB%88%E7%AB%AF%E4%B8%AD%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
if --help
在终端中不起作用,为什么?
Linux Mint 19.3 肉桂 64 位
外壳: 巴什
答案1
请参阅:help --help
或help
Display information about builtin commands.
help if
:
if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
Execute commands based on conditional.
The `if COMMANDS' list is executed. If its exit status is zero, then the
`then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list is
executed in turn, and if its exit status is zero, the corresponding
`then COMMANDS' list is executed and the if command completes. Otherwise,
the `else COMMANDS' list is executed, if present. The exit status of the
entire construct is the exit status of the last command executed, or zero
if no condition tested true.
Exit Status:
Returns the status of the last command executed.