5d26050e97
## Issue Addressed Resolves https://github.com/sigp/lighthouse/issues/2763#issuecomment-1024858187 ## Proposed Changes - Skip if the line is blank. 👌
20 lines
291 B
Bash
Executable File
20 lines
291 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Kill processes
|
|
|
|
set -Eeuo pipefail
|
|
|
|
# First parameter is the file with
|
|
# one pid per line.
|
|
if [ -f "$1" ]; then
|
|
while read pid
|
|
do
|
|
# handle the case of blank lines
|
|
[[ -n "$pid" ]] || continue
|
|
|
|
echo killing $pid
|
|
kill $pid
|
|
done < $1
|
|
fi
|
|
|
|
|