Created
March 21, 2017 19:18
-
-
Save RobChiocchio/10fdb7f98e3037da9cb2e94dbdb898d3 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo $1 | |
| read -p 'Process name to search for: ' varprocess | |
| else | |
| varprocess=$1 | |
| fi | |
| top -b -n 1 | grep -i --line-buffered $varprocess |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script to grep top