Bash Quick Start Guide
上QQ阅读APP看书,第一时间看更新

Escaping

Using escaping with backslashes, the examples from the previous section can be correctly written like this:

$ touch important\ files
$ touch Testfile\<Tom\>.doc
$ touch Review\;Final.doc
$ touch \$\$\$Money.doc

A backslash can escape another backslash, too:

$ echo \\backslash\\
\backslash\

However, it can't escape a newline within a word:

$ echo backslash\
> foo\
> bar
backslashfoobar