#!/bin/sh if [ -f /usr/bin/cygpath.exe ]; then # cygwin while avaricepid=`ps -es | grep '/avarice' | head -1 | cut -c2-7` [ "$avaricepid" != "" ] do kill -9 $avaricepid done else # linux, probably some others at least killall -q avarice fi