Implemented functions build_cmd_args() and *run_cmds() for cmd extracation and the execution of user commands.