Skip to content

Instantly share code, notes, and snippets.

@hrkt
Last active February 18, 2020 19:35
Show Gist options
  • Save hrkt/1267f6401ea8879234b257a26a4f854f to your computer and use it in GitHub Desktop.
Save hrkt/1267f6401ea8879234b257a26a4f854f to your computer and use it in GitHub Desktop.
list processes in screen sessions
#!/bin/sh
screen -list | head -n -2 | tail -n +2 | cut -f1 -d'.' | cut -f2 | xargs -n 1 pstree -p | grep "^screen"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment