Created
August 13, 2015 15:26
-
-
Save alampros/b1722933e2a6e93be89b to your computer and use it in GitHub Desktop.
Bash shortcut to search running processes with highlighting and column header
This file contains 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
#!/bin/bash | |
# Searches for given expression in process list, highlights matches, and includes the ps header row. | |
ps -Al | grep -vE "grep|pss" | grep -E "PID|$1" | column -tx | grep -A 9999 -B 9999 -E "$1" --color=auto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment