I understand that when I call exit, it is an alias for logout. Sometimes, just for fun, when I need to remove myself from a session I will type
exit && 1. Now what happens after the
exit has been executed. Where does the
1 go? Typing 1 into bash yields (obviously) this:
1: command not found. I'm not asking why 1 doesn't work. I'm asking where does the 1 go after calling exit? 1 is just an example, replace it with any other command.
exit &&&&&&& 1 yields a syntax error. So the right hand must be evaluated.
Disclaimer : This is a question in which interests me. There is not particular reason for this question besides the fact that I am curious about what happens.