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

随心笔谈11个月前发布 admin
75 0


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:\>

© 版权声明

相关文章