Skip to main content
deleted 3 characters in body
Source Link
terabyte
  • 21
  • 1
  • 5

This should solve your problem:

echo before
x=$(crash) || exit $?       # if crash give -gt 0 value then exit with the same value
echo after

This should solve your problem:

echo before
x=$(crash) || exit $?       # if crash give -gt 0 value then exit with the same value
echo after

This should solve your problem:

echo before
x=$(crash) || exit       # if crash give -gt 0 value then exit with the same value
echo after
Source Link
terabyte
  • 21
  • 1
  • 5

This should solve your problem:

echo before
x=$(crash) || exit $?       # if crash give -gt 0 value then exit with the same value
echo after