Single quotation marks: In all cases, only the characters within the quotation marks are represented.
Output:
$a = "World" <enter>
' Hello, $a '
results : Hello, $a
-
< Span style= "Color:rgb (85,85,85); font-family: ' The song Body '; > double quotes: variable substitution and character escaping are allowed.
output:
" hello, $a "
result: hello, world
&NBSP;
-
,
' I ' m $a '
result : i ' m $a
$a = "123"
result : "i ' m 123 "
&NBSP;
Escape character use
Anti-Quote ` definition, you should use "' t" to invoke
The commonly used escape strings are:
"' single quotation marks
' " Double quotes
' 0 Vacant NULL
' a Alarm
' B BACKSPACE
' F Skip Page
' n New Line
' r line Break
' t Horizontal Tab Key
' v the public Tab Key
psc:\users\administrator> "' r" ' $a, the output $a, function to remove this variable substitution
For example:
$a = "PowerShell" <enter>
"" "" Myname is ' $a "", the This program said. "<enter>
The output will be:
"Myname is $a", this program said.
Reference: http://marui.blog.51cto.com/1034148/300603
This article comes from the "Ricky's blog" blog, please be sure to keep this source http://57388.blog.51cto.com/47388/1639490
Powershell-quotation marks and escape characters