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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simple answer is: