#!/bin/bash # # # # # # Where the PIDs are PIDS=pid/*.pid for i in $PIDS; do kill `cat $i`; rm $i; done