#!/bin/bash pid=$(ps aux | grep '[0-9] node .*react-scripts start' | while read user pid rest; do echo $pid; done) if [[ "$pid" != "" ]]; then kill $pid fi