User Tools

Site Tools


scripting:bash:exitcode

When you want to check/validate that a command ran fine, you need to recuperate its exit code.
Again several ways:

  1. Easy:
     command
    returnvalue=$?
  2. All at once:
    returnvalue=$(command)$?
scripting/bash/exitcode.txt · Last modified: 2015/01/28 12:19 by warnaud