Skip to content

Instantly share code, notes, and snippets.

@ivey
Created October 29, 2008 02:05
Show Gist options
  • Save ivey/20586 to your computer and use it in GitHub Desktop.
Save ivey/20586 to your computer and use it in GitHub Desktop.
declare -a pids
i=0
for pid in log/merb.*.pid ; do
if [ $pid != "log/merb.main.pid" ]; then
pids[$i]=`cat $pid`
fi
(( i++ ))
done
# start your new merbs
for pid in ${pids[@]} ; do
kill -9 $pid
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment