Created
June 18, 2020 12:51
-
-
Save arnorhs/5bc72087c15e29dfc6c51d5227eb9bd7 to your computer and use it in GitHub Desktop.
kill gatsby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Honestly there must be an easier way to do this, but im a noob | |
PSAUX="$(ps)" | |
while IFS= read -r line; do | |
if [[ $line == *"gatsby develop"* ]]; then | |
id=$(echo $line | cut -d " " -f 1) | |
kill -9 $id | |
echo "killed 'gatsby develop' process $id" | |
fi | |
done <<< "$PSAUX" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment