LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   simple (?) pipes questions (https://www.linuxquestions.org/questions/linux-newbie-8/simple-pipes-questions-19881/)

larkin 04-30-2002 05:59 PM

simple (?) pipes questions
 
Hi. Question #1 is the following considered a single pipe:
(date; ls -la /homedir) | tee homelist | less

Question #2: if this is not considered a single pipe, what commands could I use in place of the | tee homelist | less, so that the output would go both to homelist & to screen? I tried
(date; ls -la > homelist) | less and this didn't work. Thanks.

zmedico 04-30-2002 06:49 PM

Re: simple (?) pipes questions
 
Quote:

Originally posted by larkin
Hi. Question #1 is the following considered a single pipe:
(date; ls -la /homedir) | tee homelist | less

Each one of these "|" is a pipe
Quote:

Originally posted by larkin
output would go both to homelist & to screen
You can save the output in a file (or maybe a variable) and then use it twice. You woult use "cat" for a file, or "echo" for a variable


All times are GMT -5. The time now is 11:51 AM.