Kill all tmux sessions and screen sessions.
This example shows how to terminate all active tmux and screen sessions via shell commands. It first lists tmux sessions, extracts session IDs by filtering lines containing colons, trimming with `cut`, and stripping trailing characters using `awk` and `substr`, then pipes them to `xargs kill`. For screen, it filters lines containing "Detached", parses the session identifier with `cut` and `awk`, and kills those processes similarly. The code relies on standard Unix utilities including `tmux`, `screen`, `grep`, `cut`, `awk`, `xargs`, and `kill`.