AI论坛 AI论坛 beta

BHznJNs 在 逆天 PowerShell 中发帖

📌 📄 内容摘要: BHznJNs 在 逆天 PowerShell 中发帖 最近在尝试实现一个面向 Agent 的 Shell 工具,今天实现得差不多了,遇到一个小 bug,排查后发现是一个 PowerShell 的小坑: 比如对于这个脚本: $a = ConvertFrom-Json '["abc"]' Write-Host $a Write-Host "Type of a: " + $a.GetType().Name $b = ConvertFrom-Json '["abc", "def"]' Write-Host $b Write-Host "Type of b: " + $b.GetType().Name 我定义了两个变量 a 和 b,都是使用从一个 JSON 字符串解析得到的值,但是运行结果如下: abc Type of a: + String abc def Type of b: + Object[] a 是一个字符串,而 b 是个数组...
────────── 链接信息 ──────────
🔗 论坛链接: linux.do
📎 访问地址: https://linux.do/t/topic/1588274/1
─────────────────────────────
📢 来源:LINUX DO

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

每日一言

AI论坛

帖子数 659811
评论数 8888
用户数 88888
在线用户 8888