How to find the return value of last executed command in UNIX?

前端 未结 1 1245
花落未央
花落未央 2020-12-29 03:15

How to find the return value of last executed command in UNIX?

相关标签:
1条回答
  • 2020-12-29 03:51

    You can use the shell variable $?

    Such as:

    $ true ; echo $?
    0
    $ false ; echo $?
    1
    
    0 讨论(0)
提交回复
热议问题