Loading kill-port.sh +4 −4 Original line number Diff line number Diff line #!/bin/bash -e port=$1 if pgrep -f $1 &> /dev/null if [[ ! -z "$port" ]] && pgrep -f $port &> /dev/null then kill $(pgrep -f 8001) echo Killed process on port $1 kill $(pgrep -f $port ) echo Killed process on port $port else echo "No process on port $1." echo "No process on port $port." fi exit 0 Loading
kill-port.sh +4 −4 Original line number Diff line number Diff line #!/bin/bash -e port=$1 if pgrep -f $1 &> /dev/null if [[ ! -z "$port" ]] && pgrep -f $port &> /dev/null then kill $(pgrep -f 8001) echo Killed process on port $1 kill $(pgrep -f $port ) echo Killed process on port $port else echo "No process on port $1." echo "No process on port $port." fi exit 0