237dmitry
237dmitry
> I only see Finally... I only see `Sleeping...` in bash
It ignors all of input strings, outputs them to host but you cannot set variable: ``` $res = 'a = 1', 'b = 2', 'c' | ConvertFrom-StringData # $res is...
The same result: ``` -join ([byte[]][char]0x200f) ```
`default` is executed when no switches are found that match the condition. ``` $null -eq $null # True ``` > undefined state ``` $a = $null Get-Variable a ```
> Default is not executed in that case. That is the problem. This is because there is a $null switch, which is equivalent to $Test and returns $true. If you...
> In PowerShell 7.4.2, the time to complete is 82 seconds and memory used is 3.4 GB. Yes, the same memory usage, but time to complete is about 1.2 seconds
There is `https://api.github.com` ```powershell $gh = curl -s https://api.github.com/repos/PowerShell/PowerShell/releases $url = ($gh | ConvertFrom-Json).where({ -not $_.prerelease })[0].assets.where({ $_.name -match 'x64\.msi'}).browser_download_url $url ```
Your example doesn't explain why this is needed. With or without `break`, the result is the same.
> break may be needed for performance reasons Switch with `1e6` switches? pwsh will rather crash. For example, 1001 generated switches, look at duration:  ```powershell & { $x =...
Use single `-` man bash: ``` -- A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as filenames and arguments....