Yes of course. But why would you expect me to run shell commands with random person's input? Also:
safe_exec(["rm", user_input])
This isn't safe either! Despite clearly saying "safe_exec"!