SLIDE 5 5
Quotes
The Back Quote
purpose is to tell the shell to execute the enclosed command and to insert the standard output from the command at that point
Example: echo The date and time is: `date` echo There are `who | wc -l` users logged on filelist=`ls` echo $filelist (#what is the output) mail `sort -u names` < memo #-u option removes the duplicate # entries from the file
The Back Slash
Is same as putting single quotes around a single character.
Quotes the single character that immediately follows it.
X=*
echo \$x # $x is displayed
Is interpreted inside the double quotes.
Use backslash inside the double quotes to remove the meaning of characters that otherwise would be interpreted.
Examples: echo “\$x” #$x is displayed echo “The value of x is \”$x\”” #The value of x is “5” is displayed