In linux environment, there are 3 types of quotes as far as i know. Each of the quotes bring different meaning and usage.
- ' a.k.a. single quotes - Everything wrapped in this quote won't be changed (Strong quotes)
- " a.k.a. double quotes - Quotes that doesn't expand meta-characters like "*" or "?," but does expand variables and does command substitution (Weaker quotes)
- ` a.k.a. back quotes - To execute command
Example of using back quotes within single quotes. Nothing is changed.
$ echo 'Today is `date`'
Today is `date`
Example of using back quotes within double quotes. The `date` command will be executed
$ echo "Today is `date`"
Today is Mon May 26 09:42:50 MYT 2008
No comments:
Post a Comment