gpt4 book ai didi

powershell - 使用powershell查找项目中的行数

转载 作者:行者123 更新时间:2023-12-03 08:18:52 29 4
gpt4 key购买 nike

我试图找到一种方法来计算我拥有的项目的所有源文件中的总行数。我试过管道 dir -r -name进入 measure-object -line ,但这只是计算我拥有的文件数。

有没有人有脚本来做到这一点?

最佳答案

Get-ChildItem -Filter "*.cs" -Recurse | Get-Content | Measure-Object -line

关于powershell - 使用powershell查找项目中的行数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/561327/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com