Quotes (Shell Scripting)
The two types of quotes in shell scripts are single quotes ' and double quotes ". Both are used whenever you want to include spaces in a given parameter or expression. The difference is that double quotes have variable replacement while single quotes do not. For example, given the following code…
#!/bin/bash
myvar=7
echo "Myvar is $myvar"
echo 'Myvar is $myvar'
echo Myvar is $myvar
…the result is…
Myvar is 7
Myvar is $myvar
Myvar is 7
page revision: 1, last edited: 05 May 2008 20:05