cal April 2012 | cat > t | cat < t | more
Why does it showing nothing? Why isn’t it showing
April 2012
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
|(anonymous pipe) connects stdout (1) of the first process with stdin (0) of the second. After redirecting the output to a file, there is no stdout left, so there’s nothing to pipe. Also,cat | cat < filedoes not really make sense, it gets two inputs connected to stdin (at least with bash, redirection comes later and “wins”:echo uiae | cat <somefilewill output the content of somefile)If you want to display output of a command and, at the same time, write it to the file, use the
teebinary. It writes to a file, but still writes to stdout