mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Moving Escape chars section to string section
This commit is contained in:
parent
fc9b23f357
commit
a1b13e3757
@ -149,6 +149,18 @@ $age = 22
|
|||||||
"{0} said he is {1} years old." -f $name, $age # => "Steve said he is 22 years old"
|
"{0} said he is {1} years old." -f $name, $age # => "Steve said he is 22 years old"
|
||||||
"$name's name is $($name.Length) characters long." # => "Steve's name is 5 characters long."
|
"$name's name is $($name.Length) characters long." # => "Steve's name is 5 characters long."
|
||||||
|
|
||||||
|
# Escape Characters in Powershell
|
||||||
|
# Many languages use the '\', but Windows uses this character for
|
||||||
|
# file paths. Powershell thus uses '`' to escape characters
|
||||||
|
# Take caution when working with files, as '`' is a
|
||||||
|
# valid character in NTFS filenames.
|
||||||
|
"Showing`nEscape Chars" # => new line between Showing and Escape
|
||||||
|
"Making`tTables`tWith`tTabs" # => Format things with tabs
|
||||||
|
|
||||||
|
# Negate pound sign to prevent comment
|
||||||
|
# Note that the function of '#' is removed, but '#" is still present
|
||||||
|
`#Get-Process # => Fail: not a recognized cmdlet
|
||||||
|
|
||||||
# $null is not an object
|
# $null is not an object
|
||||||
$null # => None
|
$null # => None
|
||||||
|
|
||||||
@ -709,19 +721,6 @@ $x=1
|
|||||||
.{$x=2};$x # => 2
|
.{$x=2};$x # => 2
|
||||||
|
|
||||||
|
|
||||||
# Escape Characters in Powershell
|
|
||||||
# Many languages use the '\', but Windows uses this character for
|
|
||||||
# file paths. Powershell thus uses '`' to escape characters
|
|
||||||
# Take caution when working with files, as '`' is a
|
|
||||||
# valid character in NTFS filenames.
|
|
||||||
"Showing`nEscape Chars" # => new line between Showing and Escape
|
|
||||||
"Making`tTables`tWith`tTabs" # +> Format things with tabs
|
|
||||||
|
|
||||||
# Negate pound sign to prevent comment
|
|
||||||
# Note that the function of '#' is removed, but '#" is still present
|
|
||||||
`#Get-Process # => Fail: not a recognized cmdlet
|
|
||||||
|
|
||||||
|
|
||||||
# Remoting into computers is easy
|
# Remoting into computers is easy
|
||||||
Enter-PSSession -ComputerName RemoteComputer
|
Enter-PSSession -ComputerName RemoteComputer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user