Skip to content

Instantly share code, notes, and snippets.

@RobChiocchio
Created March 21, 2017 19:18
Show Gist options
  • Select an option

  • Save RobChiocchio/10fdb7f98e3037da9cb2e94dbdb898d3 to your computer and use it in GitHub Desktop.

Select an option

Save RobChiocchio/10fdb7f98e3037da9cb2e94dbdb898d3 to your computer and use it in GitHub Desktop.
#!/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
@RobChiocchio
Copy link
Author

Script to grep top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment