#!/bin/csh ############################################################### # This script kills the currently-playing sox program, which # is what the 'play' command calls. This causes any ongoing # play script to go to the next song. ############################################################## # The -C tells it to list processes by command. The -o sets # the output format, with the = meaning no header. set jobid = `ps -C sox -o pid=` if ( `echo -n $jobid | wc -c` > 0 ) then kill -TERM $jobid >& /dev/null endif exit 0