Advanced · Let commands collaborate
tee: Output and save pipeline contents
Syntax
tee [-a] [file…]Options
-a- Additional content
Examples
grep ERROR logs/app.log | tee errors.txtUsage and sandbox support
tee writes files and retains standard output at the same time, suitable for saving results in the middle of pipelines.
Hands-on exercises
Related commands
echoOutput a piece of textprintfOutput text according to formatxargsConvert input into command parametersexportSet environment variablesenvView environment variablesprintenvOutput the value of environment variableunsetRemove variableshistoryView command historyclearClear the terminal displaytrueReturn success statusfalseReturn failure statusseqGenerate a sequence of numberssleepPause for specified timealiasSet command aliasunaliasRemove command aliassourceRead script in current ShellreadRead variables from inputbashRun the Bash scriptshRun the POSIX Shell scriptcommandControl command lookupjobsView current Shell jobsbgResume background jobfgResume foreground jobwaitWait for child process to endnohupIgnore hangup signal and runtimeoutLimit command running timewatchDisplay command results periodicallytimeMeasure run timeulimitView or set resource limitssetSet Shell behaviortrapHandle exit or signaltmuxManage terminal sessionsscreenKeep terminal session