小编cat*_*tta的帖子

为什么Powershell匹配任何带有$ null的字符串

在调试Powershell脚本时找到了这个.

PS C:\temp> "hello" -match $null  
True  
Run Code Online (Sandbox Code Playgroud)

> "hello" -eq $null returns False
Run Code Online (Sandbox Code Playgroud)

为什么,在使用时-match,任何字符串都匹配$null

powershell null

3
推荐指数
1
解决办法
784
查看次数

标签 统计

null ×1

powershell ×1