Skip to content

Instantly share code, notes, and snippets.

@SeaniaTwix
Created January 31, 2023 05:46
Show Gist options
  • Save SeaniaTwix/2114c54e7eda7663438d8349e68b3a79 to your computer and use it in GitHub Desktop.
Save SeaniaTwix/2114c54e7eda7663438d8349e68b3a79 to your computer and use it in GitHub Desktop.
#!/usr/bin/env fish
set killpid
string match -rq '\\d+\\s+(?<killpid>\\d+).+CAReportingService' -- (ps -ef)
if test (string length $killpid) -gt 1
#sudo kill -9 $killpid
echo $killpid
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment