timeoutIt is not a shell utility and does not perform shell-style processing. He must be given one command to execute. However, this command can have any number of arguments. Fortunately, one of the commands you can give is bash:
timeout 1 bash -c '{ sleep 2; echo something; }'
, :
timeout 1 bash -c 'sleep 2; echo something'
bash - , timeout. -c sleep 2; echo something .