Bdfy
Bdfy

Reputation: 24621

bash command and return status

pkill return status > 0 if error ( for example if not found process ). How to return 0 status independing result of pkill ?

Upvotes: 7

Views: 4273

Answers (1)

Erik
Erik

Reputation: 91270

Either just don't test for the result, or do:

pkill whatever || true

Upvotes: 15

Related Questions