I want to pass a command and get the answer printed. I have tried this
#!/bin/sh
cmd = `ps -ef|grep processname`
echo "$cmd"
But i am getting the error as
: command not found 4: cmd
the output of this command may be 5 or 6 lines. I just want to view them.