Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Post History
tmux has a capture-pane command. For example: start session: tmux new-session -t s1 do python stuff detach from session (eg. Ctrl-b d) or execute step 4 in a different terminal tmux capture-p...
#2: Post edited
- `tmux` has a `capture-pane` command. For example:
- 1. start session: `tmux new-session -t s1`
- 2. do python stuff
- 3. detach from session (eg. `Ctrl-b` `d`) or execute step 4 in a different terminal
- 4. `tmux capture-pane -t s1 -S - -p | awk '/welcome-msg/,0' >logfile`
- * change the awk regex to something that matches your welcome line
5. end session: `tmux kill-session -t s1`
- `tmux` has a `capture-pane` command. For example:
- 1. start session: `tmux new-session -t s1`
- 2. do python stuff
- 3. detach from session (eg. `Ctrl-b` `d`) or execute step 4 in a different terminal
- 4. `tmux capture-pane -t s1 -S - -p | awk '/welcome-msg/,0' >logfile`
- * change the awk regex to something that matches your welcome line
- 5. end session: `tmux kill-session -t s1`
- Instead of storing to a logfile, you could also pipe into `xclip -i` or somesuch to set the X selection directly.
#1: Initial revision
`tmux` has a `capture-pane` command. For example: 1. start session: `tmux new-session -t s1` 2. do python stuff 3. detach from session (eg. `Ctrl-b` `d`) or execute step 4 in a different terminal 4. `tmux capture-pane -t s1 -S - -p | awk '/welcome-msg/,0' >logfile` * change the awk regex to something that matches your welcome line 5. end session: `tmux kill-session -t s1`
