#1010103 [Bug report] Bash: issues with redirecting output

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Mcgiwer
Date:
2022-04-24 14:15:04 UTC
Severity:
normal
Tags:
#1010103#5
Date:
2022-04-24 14:12:34 UTC
From:
To:
OS: Debian 11

Description:

I had found a strange issue in Bash: there is a problem with redirecting the output of some commands when executing them in the console.

I had attempted all variants (wroten as a template):

\`\`\`
\* command > file.txt
\* command >> file.txt
\* command 1> file.txt
\* command 2> file.txt
\* command 3> file.txt
\* command &> file.tx
\* command \| tee file.txt
\`\`\`

In every case the output was shown in the console and the file remained empty.

Could anyone check what's wrong?

I had tested it on:

\`\`\`
apt update \| grep "NO\_PUBKEY"
\`\`\`

after with I had included the mentioned redirections.

Greetings,
Mcgiwer