您的位置:首页 > 运维架构 > Shell

2008脚本大赛PowerShell Sudden Death Event 4解题及分析

2008-02-26 18:56 405 查看
英文题目位置: http://www.microsoft.com/technet/scriptcenter/funzone/games/games08/sdevent4.mspx

英文解题: http://www.microsoft.com/technet/scriptcenter/funzone/games/solutions08/sdsol04.mspx

题目很容易, 每次从字符串读两个数字对应的字符, 类型转换为[char]. 以来双引号保护数组时, 自动将他们连接起来就好了.

$ofs = ''
"$($str = ${C:/Scripts/numbers.txt}; for ($i = 0; $i -lt $str.Length; $i += 2) { [char] [int] $str.Substring($i, 2) })"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: