Linux Quoting

Single forward quotes inhibit filename and variale expansion and causes the quoted content to be treated as a word.

Double quotes also cause quoted content to be treated as a whole. But double quotes allow expansion. The following code will print "$lang ruby".

::
    lang=ruby
    single='$lang'
    double="$lang"
    echo $single $double

Backward single quotes pass the quoted content to a subshell for evulation.

你可能感兴趣的:(linux,Ruby)