Doing 2 points with result from a command
I have a program
texcount that outputs the variety of words in my LaTeX record. I can additionally pipeline the result of this to
sed to make the newlines TeX linebreaks and also write this to a documents which I can after that include in my last record. Yet when I do
texcount foo.tex | sed s/$/'\\\\'/ > wc.tex the command line result of
texcount is subdued.
Just how can I get the result of the first command to be presented in the incurable and also piped to sed?
You require the "tee" command, which permits you to divide pipelines.
texcount foo.tex | tee >output.txt | sed s/$/'\\\\'/ > wc.tex ; cat output.txt
This would certainly leave you the added output.txt documents. Read this for even more details : http://www.unixtutorial.org/2007/12/tee-replicate-standard-output/ You can additionally do "male tee".