1 回答

TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超7個(gè)贊
您的代碼沒(méi)有任何問(wèn)題,如果您嘗試在終端中執(zhí)行完全相同的命令,并查看退出狀態(tài),它將是64:
? ~ log help
usage:
log <command>
global options:
-?, --help
-q, --quiet
-v, --verbose
commands:
collect gather system logs into a log archive
config view/change logging system settings
erase delete system logging data
show view/search system logs
stream watch live system logs
stats show system logging statistics
further help:
log help <command>
log help predicates
? ~ echo $?
64
如果您想知道它為什么返回64,您可以詢(xún)問(wèn)sysexits它的含義:
? ~ man sysexits | grep -A 3 '64'
EX_USAGE (64) The command was used incorrectly, e.g., with the
wrong number of arguments, a bad flag, a bad syntax
in a parameter, or whatever.
- 1 回答
- 0 關(guān)注
- 158 瀏覽
添加回答
舉報(bào)