If you run a script using a command like exec myscript and the script includes a logout command, the script will end abruptly and so will the shell from in which it was running. Using the source ...