Example #1) 'Unmodified' PuTTY login to default directory >> Enter 'Top' Command >>> enter 'q' = You land back at the root (default) directory.
Example #2) Use the PuTTY settings option remote command = "Top" >> From the top enter 'q' = Instant logout (session closed)
Example #3) Same as #2 w/ 1 difference: PuTTY remote command = echo "Hello World!"; top;
^^^ re #3: I was thinking the brief pause to echo (for example) Hello World! would simulate Example #1 and after 'q' I would land back "Home", but the result was equal to #2 (session closed)
Quick Summary: This is one of those things which "should be simple"; How do I login straight to the 'top' and still have a session after 'q'?
...
.. EDIT: An amazingly fast flood of answers for this time of morning!
logout: not login shell: use `exit'
Here is the exact code which is working best:
top; /bin/bash -il
I'm also testing Phil's code now, his is virtually the same.