powershell - 如何在PowerShell中使用管道输入
问题描述
我正在尝试使用通过管道传输到命令中的输入对象,如下所示:
gci C:\Users\user\ | where name -match "txt" | notepad.exe $_.name
但是,这并没有按预期工作,我知道 BASH 必须-
将上一个命令的输出放入下一个命令。我如何在powershell中做同样的事情?还是我缺少另一种方法?还有一种方法可以解释空格/等吗?
解决方案
推荐阅读
- python - 获取自定义维度的基本单位
- python - 如何在k-means sklearn python的每次迭代中找到聚类中心
- ruby-on-rails - 防止 Rails 添加控制器名称作为参数
- c# - 使用 QueryBuilds 从 TFS 查询构建的性能非常低
- javascript - react-cookie-consent 不适用于公用文件夹中的 html 页面
- python - 缺少争论
- python - 如何在另一条线上停止 pyplot 线?
- docker - 有没有办法通过 Windows 文件资源管理器查看 WSL2 docker 容器的文件?
- sharepoint - Microsoft PowerAutomate 流响应 ID
- reactjs - 无法从组件中的 api 获取数据