个人工具

“沙盒”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第9行: 第9行:
 
Quoting is used to remove the special meaning of certain characters or words to the shell. Quoting can be used to disable special treatment for special characters, to prevent reserved words from being recognized as such, and to prevent parameter expansion.  
 
Quoting is used to remove the special meaning of certain characters or words to the shell. Quoting can be used to disable special treatment for special characters, to prevent reserved words from being recognized as such, and to prevent parameter expansion.  
  
Each of the shell metacharacters (see [[#Definitions|Definitions]]) has special meaning to the shell and must be quoted if it is to represent itself. When the command history expansion facilities are being used (see History Interaction), the history expansion character, usually ‘!’, must be quoted to prevent history expansion. See Bash History Facilities, for more details concerning history expansion.  
+
Each of the shell metacharacters (see [[#Definitions|Definitions]]) has special meaning to the shell and must be quoted if it is to represent itself. When the command history expansion facilities are being used (see [[#History Interaction|History Interaction]]), the history expansion character, usually ‘!’, must be quoted to prevent history expansion. See [[#Bash History Facilities|Bash History Facilities]], for more details concerning history expansion.  
  
 
There are three quoting mechanisms: the escape character, single quotes, and double quotes.
 
There are three quoting mechanisms: the escape character, single quotes, and double quotes.

2016年7月4日 (一) 09:50的版本

3.1.2

  • Escape Character: How to remove the special meaning from a single character.
  • Single Quotes: How to inhibit all interpretation of a sequence of characters.
  • Double Quotes: How to suppress most of the interpretation of a sequence of characters.
  • Double Quotes: How to expand ANSI-C sequences in quoted strings.
  • Locale Translation: How to translate strings into different languages.

Quoting is used to remove the special meaning of certain characters or words to the shell. Quoting can be used to disable special treatment for special characters, to prevent reserved words from being recognized as such, and to prevent parameter expansion.

Each of the shell metacharacters (see Definitions) has special meaning to the shell and must be quoted if it is to represent itself. When the command history expansion facilities are being used (see History Interaction), the history expansion character, usually ‘!’, must be quoted to prevent history expansion. See Bash History Facilities, for more details concerning history expansion.

There are three quoting mechanisms: the escape character, single quotes, and double quotes.