I have set of commands and I want all of them to be defined in a single variable. below are the commands I want display in output.
pwdx `ps -ef | grep java | cut -d' ' -f4` | cut -d/ -f7
I tried with
app=`pwdx `ps -ef | grep java | cut -d' ' -f4` | cut -d/ -f7`
echo $app
but this gives empty output. Tried using for loop, that failed too.