I am trying to store a cat output into a variable and then trying to echo it. and then I would like to kill the process.
#!/bin/bash
var = $(cat tmp/pids/unicorn.pid)
echo $var
sudo kill -QUIT $var
Please if anyone can tell where I am going wrong
=. It should bevar=$(cat tmp/pids/unicorn.pid). Also provide valid path.tmp/pids/unicorn.pidis a valid path; it might not be the right path, but that isn't relevant to this question.