If I start a screen session with screen -dmS name, how would I access the command history of that screen session with a script?
Using the ↑, the last executed command appears, even in screen.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
screendoesn’t maintain a history of the commands you type. Your shell may or may not keep a history. Since you appear to usebash, you can use thehistorycommand.screendoes appear to have a crude approximation of a history search (it merely searches the scrollback buffer for a command line. See thescreenman page under the “history” command (bound toC-a {by default).