Answer the question
In order to leave comments, you need to log in
How to get the exit code of a custom function in an IF?
Good day colleagues.
I have a bash script function like
myCustomFunc()
{
if ; then
echo "Some info message"
return 0
fi
return 1
}
return 0
or something. According to all the instructions / guides that Google showed me, this is solved like this:myCustomFunc
if ; then
echo "Some success message"
fi
myCustomFunc
get this function completion code immediately in IF
without calling it first before it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question