Skip to content

Bash garbling output after stderr to stdout redirection and then piping to tee #68

@IgorTodorovskiIBM

Description

@IgorTodorovskiIBM

Here's a reduced scenario:
a.sh:

#!/bin/sh
echo "blabla" >&2
echo "blabla" >&2

The output is garbled:

$ ./a.sh 2>&1 | tee a.txt
blabla
�%/�%/�
$ _TAG_REDIR_OUT= ./a.sh 2>&1 | tee a.txt
blabla
blabla

Works when _TAG_REDIR_OUT is unset as above

There might be some double conversion happening due to _TAG_REDIR_OUT=txt and bash tagging stdout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions