you can run sh -c ..., but do not forget to specify correctly.
sudo sh -c 'id; echo another command ; id'
sudoshould see this as the only argument for the team sh.
Of course, you can use a new line instead of a semicolon:
sudo sh -c '
echo "I am root"
id
echo "another command"
id
'
source
share