Skip to content

Instantly share code, notes, and snippets.

@McDevon
Created November 19, 2013 14:47
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 McDevon/7546420 to your computer and use it in GitHub Desktop.
Save McDevon/7546420 to your computer and use it in GitHub Desktop.
#!/bin/bash
declare -a processes=('roslaunch' 'point2point')
for i in "${processes[@]}"
do
num=$(ps -a | grep -v grep | grep $i | head -n1 | awk '{print $1;}')
kill $num
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment