

If I were updating the command, it would use ' instead of ' $*' as shown. The normal temporary file names ($tmp.1, etc) are preserved by a fixed name (tmp.1, etc), and the intermediate results are preserved in tmp.4. Sed -e '1s/^[ -e three sed scripts that are run are ghastly - I don't plan to show them. # (like -x) to the sub-shell if they are set for the parent shell. # The hieroglyphs on the shell line pass on any control arguments # The evals are there in case $DEBUG was yes. (It was last modified in 1998, as it happens.) # If $DEBUG is yes, record the intermediate results.

This is the tail-end of a ghastly shell script that is a decade overdue for a rewrite in Perl, but it still works. I find that the tee command is very useful in debugging shell scripts that contain long pipelines. Hopefully, the modified example (original) helps to understand its use: curl "(Unix)" | tee original_site | sed 's// /g' | tr 'A-Z ' 'a-z\n' | grep '' | sort -u | comm -23 - /usr/share/dict/words It is like a branch in Git, or better, please, see the T analogy by Rick Copeland. It is useful in places such as /etc/init.d/, where you will find read-only files. Since you can use Sudo-commands with Vim, you can use the command if you forgot to run as a sudo. It shows the convention to escalate permissions: echo "Body of file." | sudo tee root_owned_file > /dev/null

The example is not about just logic, rather convention. the escalation of permissions with the sudo- and -tee commands
