I'm trying to create an alias in my .bash_profile so if I run it it will kill any app that I choose.
What I've done:
alias terminate='ps -ax | grep '
If I run terminate App, returns list of App ID, so then I do kill + App ID and it's done.
Now, if that App has many ID's it's a pain in the ass to have to do kill + ID for each ID.
Apparently, if I do kill -9 $(ps -ax | grep App)
, it kills the entire App.
(What I do is kill -9 $(terminate App)
)
Now I want to create another alias, as fullkill
, so if I run fullkill App
it would do the same.
What I've tried:
alias fullkill='kill -9 $(ps -ax | grep )'
Run:
fullkill App
Returns
- bash: kill: App: arguments must be process or job IDs