Is there a way to both echo the output of a command to the terminal and redirect to a file using a single file rather than using 2 separate commands in csh (for historical reasons i must use csh for this purpose). Currently I do this
echo "Hello World!"
echo "Hello World!" > textfile
echo "next line blah blah"
echo "next line blah blah" >> textfile
This is exactly what
teeis for:For multiple outputs, you can use
or use the append option with
tee.