I assume the error lies in communication
Dont have to copy paste the leading $ (or # in other examples).
$ indicates you write the command as user.
# indicates you write the command as root.
That comes from the indicator of PS1
PS1="\\$"
Which shows either $ or # depending on user ID (eg: 0 vs 500/1000).
Hope this helps
EDIT: Err, just tried myself, doesnt seem to be the reason - sorry.
Might be of shopt setting maybe?
Works well on 3.11.3-201.fc19.x86_64.