Skip to main content

tee

Function tee 

Source
pub async fn tee(ctx: CommandContext) -> CommandResult
Expand description

Execute the tee command

Reads stdin, copies it to stdout so the pipeline keeps flowing, and writes the same bytes to every file operand. File operands are truncated unless -a is given. A file that cannot be written reports an error and sets the exit code to 1, but the remaining files and stdout are still written, which is what GNU tee does.