After piping a file with SQL statements to mysql, how can I keep the command line session open?
Start an interactive shell, then just do:

source in.sql


... at the mysql prompt. The session will still be open after the file is executed, unless the file has a command in it that causes the mysql shell to exit.