How can I do something like this in bash?
if "`command` returns any error";
then
echo "Returned an error"
else
echo "Proceed..."
fi
|
How can I do something like this in bash?
|
||||
|
|
|
For small things that you want to happen if a shell command works, you can use the
Similarly for small things that you want to happen when a shell comand fails, you can use
It's probably unwise to do very much with these constructs, but they can on occasion make the flow of control a lot clearer. |
|||
|
|
|
That's exactly what bash's
|
|||||||||||||||||
|
|
Check the value of
|
|||
|