无法在没有 tee 的情况下在 Zsh 中使用多个输出

发布于 2024-07-18 08:34:37 字数 346 浏览 4 评论 0原文

我在 .zshrc 中有以下内容

setopt multios

我正在尝试在 Zsh 中启用上述选项的情况下执行以下操作

ls -1 | tee file.txt | less

我运行以下命令失败

ls -1 | file.txt | less

,并且也运行以下命令

ls -1, file.txt, less

如何在没有命令 tee 的情况下在 Zsh 中使用多个输出?

I have the following in .zshrc

setopt multios

I am trying to do the following with the above option enabled in Zsh

ls -1 | tee file.txt | less

I run the following command unsuccessfully

ls -1 | file.txt | less

and the following too

ls -1, file.txt, less

How can you use multiple outputs in Zsh without the command tee?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

入画浅相思 2024-07-25 08:34:37

第二个语法错误,应该是

ls -1 > file.txt | less

That second one is the wrong syntax, it should be

ls -1 > file.txt | less
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文