I have script file where a command is stored in a variable
First i got the command (assume "ls -l " command)
cmd=`cat /proc/2345/cmdline`
now doing
echo $cmd
outputs
ls -l
Now how to use $cmd to actually execute that command. which is ls -l