/bin/true

true命令啥都不作,只設置退出碼爲0。
在Linux底下,每一個程序執行完畢都會返回一個退出碼給調用者,通常狀況下0表示成功,其餘值代表有問題,固然某些程序的退出碼有特殊含義。有些shell下true多是個內建命令,至少bash下是。(do nothing, successfully。Exit with a status code indicating success. NOTE: your shell may have its own version of true, which usually supersedes the version described here. Please refer to your shell’s documentation for details about the options it supports.)
相對應的命令是false,也是啥都不幹,但退出碼設置爲1。shell

本站公眾號
   歡迎關注本站公眾號,獲取更多信息