This is my shell command:
sudo sh -c "echo "#" > /file"
But it doensn't work but this does work:
sudo sh -c "echo "hi" > /file"
How can I fix this, because the # needs to be in it.
migrated from stackoverflow.com May 11 '13 at 18:29
This question came from our site for professional and enthusiast programmers.
If you don't want to use different quotes for just one character, you could also escape the hash character:
Like in many scripting languages, shell commands interpret a hash character (