The use of hard quotes (single quotes) lets everything inside the quotes pass as part of the string. You can enclose double quotes inside hard quotes and even shell variable names - they won't be interpreted inside single quotes. The ">" character will just be another character inside single quotes.
echo 'Single quotes are "hard" quotes!' >> 000.test
echo '< and > are tricky characters - I do not even know their names' >> 000.test
echo '...we can even pass $SHELL variable names.' >> 000.test
With double quotes, environment/shell variables such as $SHELL will be interpreted and the value of the variable will be printed instead of $SHELL.
echo "My favourite shell is $SHELL" >> 000.test
...will append the line "My favourite shell is /bin/bash" as I use bash.
Last edited by hw-tph; 01-19-2004 at 05:35 PM.