December 2012
Intermediate to advanced
888 pages
48h 24m
English
If a string contains embedded spaces, you can enclose the string in double quotes (“) so that the shell interprets the whole string as one entity instead of more than one.
For example, if you assigned the value of abc def (abc followed by one space, followed by def) to a variable called x in a shell program as follows, you would get an error because the shell would try to execute def as a separate command:
The shell executes the string as a single command if you surround the string in double quotes as follows:
The double quotes resolve all variables within the string. ...
Read now
Unlock full access