for example I have this script that kills firefox
ps x | grep firefox | grep -v grep | awk '{print $1}'| xargs kill -9
but when there is no firefox running it spits out:
Usage:
kill pid ... Send SIGTERM to every process listed.
kill signal pid ... Send a signal to every process listed.
kill -s signal pid ... Send a signal to every process listed.
kill -l List all signal names.
kill -L List all signal names in a nice table.
kill -l signal Convert between signal numbers and names.
What is the easiest way to display error message?