Utils/tee.ps1
|
Register-GnuUtil @{ Name = 'tee' Category = 'Shell helpers' Synopsis = 'Read from standard input and write to standard output and files.' Usage = @('tee [OPTION]... [FILE]...') Description = @('Copy standard input to each FILE, and also to standard output.') Options = @( @{ Short = 'a'; Long = 'append'; Help = 'append to the given FILEs, do not overwrite' } @{ Short = 'i'; Long = 'ignore-interrupts'; Help = 'ignore interrupt signals (accepted, no effect in PowerShell)' } @{ Short = 'p'; Key = 'output-error'; Value = 'warn-nopipe'; Help = 'operate in a more appropriate MODE with pipes' } @{ Long = 'output-error'; Arg = 'MODE'; OptionalArg = $true; Help = 'set behavior on write error (accepted; errors are always reported)' } ) Notes = @( 'PowerShell note: files are written as UTF-8 without BOM, with LF line endings.', 'Lines are written as they arrive, so tee works with long-running pipelines.' ) } |