I would like to ask the user to enter a command that will be executed, but I don't understand why I can't assign two commands to the same variable.
Here is the code:
user@localhost:~# read -ep "command: " cmd ; "$cmd"
and the result:
command: id ; date
-bash: id ; date : command not found
but if I type a single command, it works.
Thanks for your help