Double quotes


Double quotes tell the shell to take the text in between the quote marks " " as regular characters. All special characters lose their meaning, except the $ (dollar sign), \ (backslash), and ` (backquote).

As an example, the command

$ touch new file
$ ls -l 
-rw-rw-r-- 1 tom students 0 Oct 8 15:18 file
-rw-rw-r-- 1 tom students 0 Oct 8 15:18 new

creates two files, as the touch command interprets two strings as individual arguments.

In contrast, the command

$ touch "new file"
$ ls -l 
-rw-rw-r-- 1 tom students 0 Oct 8 15:19 new file

creates one file, as it takes the whole string as one name, one argument.

The special characters are unaffected by the double quotes, like in the following example:

$ echo I am $USER
I am tom 
$ echo "I am $USER" 
I am tom

Result on the same text, as the environment variable $USER gets interpreted the same in both cases.