Created
October 19, 2017 23:40
-
-
Save dalbertom/ee9a383bce3102e10bc604e849de9d90 to your computer and use it in GitHub Desktop.
tmux pgrep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| pattern=${1?pattern} | |
| grep -f <(ps -o tty= -p $(pgrep $pattern)) <(tmux list-panes -a -F "#{pane_tty} #S #W") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment