Powershell - 将大量文本写入文件的最快方法 [英] Powershell - Fastest way to write large body of text to a file

查看:42
本文介绍了Powershell - 将大量文本写入文件的最快方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就运行时性能而言,powershell 中将大量文本写入文件的最快方法是什么?

In terms of runtime performance, which is the fastest method in powershell to write a large body of text into a file?

推荐答案

$sw = new-object system.IO.StreamWriter(<my file path>)
$sw.write(<my large body of text>)
$sw.close()

这篇关于Powershell - 将大量文本写入文件的最快方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆