How do I loop a pipe in Zsh?

Penz says the problem can be solved using Multios and coproc's features.

However, I am not sure about the solution.

I know you can use multios like

ls -1 > file | less

      

but I've never used so that you have two inputs.

How can you use these functions to create a loop in Zsh?

0


a source to share


1 answer


I am having trouble understanding the questions.

You are trying the following:

(ls -1 && file) | less

      

Where && is used for multiple commands on one line.



Or are you trying the following:

ls -1 | tee file | less

      

Where tee puts output to file and standard.

+2


a source







All Articles