预计阅读本页时间:-
Special Characters and Quoting
The characters <, >, |, and & are four examples of special characters that have particular meanings to the shell. The wildcards we saw earlier in this chapter (*, ?, and [...]) are also special characters.
Table 1-6 gives the meanings of all special characters within shell command lines only. Other characters have special meanings in specific situations, such as the regular expressions and string-handling operators that we'll see in Chapter 3 and Chapter 4.
广告:个人专属 VPN,独立 IP,无限流量,多机房切换,还可以屏蔽广告和恶意软件,每月最低仅 5 美元
Table 1-6. Special characters
Character
Meaning
See chapter
~
Home directory
`
Command substitution (archaic)
#
Comment
$
Variable expression
&
Background job
*
String wildcard
(
Start subshell
)
End subshell
\
Quote next character
|
Pipe
[
Start character-set wildcard
]
End character-set wildcard
{
Start command block
}
End command block
;
Shell command separator
`
Strong quote
<">
Weak quote
<
Input redirect
>
Output redirect
/
Pathname directory separator
?
Single-character wildcard
!
Pipeline logical NOT