Close

Bash – If-Statement based on exit codes

{some command}
if [ $? -eq 0 ]; then
  ...
else
  ...
fi