I am confused by the following bash line written by someone else:
return -1 || exit -1
What does it mean? I understand that the construction ||means that the first part (in this case return -1) failed (i.e., returned a non-zero code), then the second part ( exit -1) is executed . The same thing is strange that this statement is not part of any function, but in the main part of the script.
I appreciate someone who explains this to me.
source
share