On 2/9/22 3:28 AM, Nikos Papaspyrou wrote:
> On Wed, Feb 9, 2022 at 9:14 AM Nikos Papaspyrou <nikol...@google.com> wrote:
>>
>> On Wed, Feb 9, 2022 at 8:30 AM Bernhard Voelker
>> <m...@bernhard-voelker.de> wrote:
>> >
>> > > More specifically, lines ending with carriage return are sent to the
>> > > standard output but not to the files.
>> >
>> > -1
>> > IMO it's not tee(1)'s business to modify the content it is streaming.
>>
>> This is a fair comment and in principle I can only agree. However, if the
>> intended behavior is to send something different to the LOG file from what
>> goes to the standard output, there's no easy way to obtain it unless sed
>> implements it.
> 
> On second thought, with the proposed option:
> 
>   $ tee --remove-cr FILE1 FILE2 ...
> 
> is equivalent to:
> 
>   $ tee >(remove-cr > FILE1) >(remove-cr > FILE2) ...
> 
> where remove-cr is a filter that does:

  input | remove-cr | tee FILE1 FILE2

Or:

  remove-cr < FILE | tee FILE1 FILE2

https://en.wikipedia.org/wiki/Pipeline_(Unix)

Rob

Reply via email to