PowerShell实现统计函数嵌套深度(powershell 运行脚本)没想到

随心笔谈2年前发布 admin
170 0 0

文章摘要

这篇文章描述了两组不同深度测试的结果。第一组测试(PS C:> Test-Diving -Depth 1 到 PS C:> Test-Diving -Depth 10)显示计算深度与实际深度完全一致,分别为1米到10米。第二组测试(PS C:> Test-Diving -Depth 1 到 PS C:> Test-Diving -Depth 10)显示计算深度依次为2米到11米,比实际深度多1米。文章通过测试展示了计算深度与实际深度的关系,突出了计算深度与实际深度之间的差异。


PS C:\> Test-Diving -Depth 1
diving deeper to 1 meters…
calculated depth: 1
diving deeper to 2 meters…
calculated depth: 2
diving deeper to 3 meters…
calculated depth: 3
diving deeper to 4 meters…
calculated depth: 4
diving deeper to 5 meters…
calculated depth: 5
diving deeper to 6 meters…
calculated depth: 6
diving deeper to 7 meters…
calculated depth: 7
diving deeper to 8 meters…
calculated depth: 8
diving deeper to 9 meters…
calculated depth: 9
diving deeper to 10 meters…
calculated depth: 10

PS C:\> & { Test-Diving -Depth 1 }
diving deeper to 1 meters…
calculated depth: 2
diving deeper to 2 meters…
calculated depth: 3
diving deeper to 3 meters…
calculated depth: 4
diving deeper to 4 meters…
calculated depth: 5
diving deeper to 5 meters…
calculated depth: 6
diving deeper to 6 meters…
calculated depth: 7
diving deeper to 7 meters…
calculated depth: 8
diving deeper to 8 meters…
calculated depth: 9
diving deeper to 9 meters…
calculated depth: 10
diving deeper to 10 meters…
calculated depth: 11

PS C:\>

© 版权声明

相关文章