- 论坛徽章:
- 0
|
转义符'\' 在“”中是作为普通字符还是特殊字符?
- 慢慢看吧,应该很权威了
- shell转义
- 1, Each of the metacharacters listed above (See Definitions above) has a
- special meaning to the shell and causes termination of a word unless quoted.
- 2, A character can be quoted (i.e., made to stand for itself) by
- preceding it with a \. The pair \new-line is ignored.
- 3, All characters enclosed between a pair of single quote marks (''), are quoted. A
- single quote cannot appear within single quotes.
- 4, Inside double quote marks (""), parameter and command substitution occurs and \ quotes
- the
- characters \, `, ", and $. (vita remark 句号) $* and $@ have identical meanings when
- not quoted or when used as a parameter assignment value or as a file name. "$*"
- is equivalent to "$1d$2d...", where d is the first character of the IFS parameter,
- whereas "$@" is equivalent to "$1" "$2" ....
- 5, The special meaning of keywords or aliases can be removed by quoting
- any character of the keyword. The recognition of function names or
- special command names listed below cannot be altered by quoting them
复制代码 |
|