-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
File Content
PowerShell reads file line by line, which works like .NET 's File.ReadAllLine(). which means, the $myLetter is a string array.
And $myLetter.Contains("Hi"); only searches in the first child of the array.
Space after `
This is obvious. ` escape any character in pwsh. Without the space, pwsh will escape the LF, and will seize
$aAndB = $a `
-and $b
as one expression.
But with the space, ` will escape the space instead of the LF. and will seize the codes as two expressions.
$aAndB = $a will set $aAndB to true
-and $b is invalid and will be ignored.
In powershell, theory and practice are combined: Nothing works and nobody knows why.
Metadata
Metadata
Assignees
Labels
No labels