I try to kill a process by pid file:
kill -9 $(cat /var/run/myProcess.pid)
The pid file contains the process number. However executing the kill gives me no stdout and the processes is still alive. But this works:
kill -9 PID
What is wrong with the first kill command? Does it fail to extract the PID from the file?
Example content of pid file:
5424
and
kill -9 5424
works.