User Tools

Site Tools


scripting:bash:exitcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scripting:bash:exitcode [2015/01/28 12:19] – created warnaudscripting:bash:exitcode [2020/12/17 05:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +When you want to check/validate that a command ran fine, you need to recuperate its exit code.\\ 
 +Again several ways: 
 +  - Easy: <code bash> command 
 +returnvalue=$?</code> 
 +  - All at once:<code bash>returnvalue=$(command)$?</code>