Skip to content

Instantly share code, notes, and snippets.

@alampros
Created August 13, 2015 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alampros/b1722933e2a6e93be89b to your computer and use it in GitHub Desktop.
Save alampros/b1722933e2a6e93be89b to your computer and use it in GitHub Desktop.
Bash shortcut to search running processes with highlighting and column header
#!/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