From a1b13e3757a452658ae4ee10fe4bf0b1f11dbe98 Mon Sep 17 00:00:00 2001 From: Andrew Ryan Davis Date: Thu, 20 Aug 2020 00:11:48 -0700 Subject: Moving Escape chars section to string section --- powershell.html.markdown | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'powershell.html.markdown') diff --git a/powershell.html.markdown b/powershell.html.markdown index 027320d5..e210d40a 100644 --- a/powershell.html.markdown +++ b/powershell.html.markdown @@ -149,6 +149,18 @@ $age = 22 "{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." +# 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 # => None @@ -709,19 +721,6 @@ $x=1 .{$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 Enter-PSSession -ComputerName RemoteComputer -- cgit v1.2.3