#!/bin/bash # Read the PIDs from the file and terminate the processes while read pid; do kill $pid done < /tmp/my_processes.pid # Optionally, remove the PID file rm /tmp/my_processes.pid