【问题标题】:Equivalent of "script" command in Windows Shellscript?相当于 Windows Shellscript 中的“脚本”命令?
【发布时间】:2014-09-07 06:36:07
【问题描述】:

GNU/Linux 机器上有script 命令,它允许将所有命令行活动捕获到文件中。这是一个非常有用的工具,尤其是当我们学习新知识并希望保存命令及其输出以供将来参考时。

我目前正在Windows PowerShell 终端上学习 Git,我想将所有命令及其输出捕获到一个文件中以供将来参考。

有什么方法/命令可以在 Windows PowerShell 上实现它吗?

【问题讨论】:

    标签: windows powershell command-line


    【解决方案1】:

    尝试使用Start-TranscriptStop-Transcript cmdlet。

    您也可以使用Start-Transcript for ISE Editor module,因为这些 CmdLet 不能在 ISE 中本地工作

    【讨论】:

    • 感谢 PowerTheShell.com 网站,里面有很多好东西。
    【解决方案2】:

    它存在标准 CmdLets :Start-TranscriptStop-Transcript

    您可以在associeted TechNet documentation 中找到有关这些 CmdLet 的更多信息。

    【讨论】:

    • 我先回答,但@why 回答更完整。
    • 不,您的答案更完整,因为文档(merci beaucoup mais c'est ton mérite moi je n'ai fait que répété ce que t'as dit en Premier)
    猜你喜欢
    • 2012-02-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-31
    • 2020-02-11
    • 2020-01-20
    • 1970-01-01
    相关资源
    最近更新 更多