Concept

Tee (Unix)

In computing, tee is a command in command-line interpreters (shells) using standard streams which reads standard input and writes it to both standard output and one or more files, effectively duplicating its input. It is primarily used in conjunction with pipes and filters. The command is named after the T-splitter used in plumbing. The tee command is normally used to split the output of a program so that it can be both displayed and saved in a file. The command can be used to capture intermediate output before the data is altered by another command or program. The tee command reads standard input, then writes its content to standard output. It simultaneously copies the data into the specified file(s) or variables. The syntax differs depending on the command's implementation. The command is available for Unix and Unix-like operating systems, Microware OS-9, DOS (e.g. 4DOS, FreeDOS), Microsoft Windows (e.g. 4NT, Windows PowerShell), and ReactOS. The Linux tee command was written by Mike Parker, Richard Stallman, and David MacKenzie. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities. The FreeDOS version was developed by Jim Hall and is licensed under the GPL. The command has also been ported to the IBM i operating system. Additionally the sponge command offers similar capabilities. tee [ -a ] [ -i ] [ File ... ] Arguments: File ... A list of files, each of which receives the output. Flags: a Appends the output to each file, rather than overwriting it. i Ignores interrupts. The command returns the following exit values (exit status): 0 The standard input was successfully copied to all output files.

0 An error occurred. Using process substitution lets more than one process read the standard output of the originating process. Read this example from GNU Coreutils, tee invocation. Note: If a write to any successfully opened File operand is not successful, writes to other successfully opened File operands and standard output will continue, but the exit value will be >0.

À propos de ce résultat
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.

Graph Chatbot

Chattez avec Graph Search

Posez n’importe quelle question sur les cours, conférences, exercices, recherches, actualités, etc. de l’EPFL ou essayez les exemples de questions ci-dessous.

AVERTISSEMENT : Le chatbot Graph n'est pas programmé pour fournir des réponses explicites ou catégoriques à vos questions. Il transforme plutôt vos questions en demandes API qui sont distribuées aux différents services informatiques officiellement administrés par l'EPFL. Son but est uniquement de collecter et de recommander des références pertinentes à des contenus que vous pouvez explorer pour vous aider à répondre à vos questions.