Answered this earlier:
https://dev.getsol.us/T8411
For further clarification seeing the forums will get more of the community to see this post. !!
is not part of the sudo
command if you type !!
on its own it repeats the last command entered into the terminal. !!
is part of the shell, an so can be used with any command or on its own.
It will not put a space there because you didn't tell it to. It is just adding the last line entered into the terminal if you type sudo!!
you are appendeding the last entered command to a new string, if you want the space you have to explicitly state it sudo !!