[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in bash
From: |
Greg Wooledge |
Subject: |
Re: bug in bash |
Date: |
Sun, 12 May 2024 09:08:17 -0400 |
On Sun, May 12, 2024 at 03:55:21AM +0200, Quốc Trị Đỗ wrote:
> I found a bug when i tried with syntax <(cmd). this is an example
> cat <(wc -l) < bk
What is "wc -l" supposed to read from? It counts lines of standard input,
until EOF is reached. But its standard input is a terminal. And you're
running it as a background process.
I would *expect* this command to fail with an error message of some
kind, because a background process shouldn't be allowed to read
input from a terminal.
> How to fix it? It doesn't last that long. After a while, it will show "wc:
> stdin: read: Input/output error". Or we can ctrl C.
Sounds appropriate.
What's the "bug in bash" supposed to be? What did you think this command
would do?
- bug in bash, Quốc Trị Đỗ, 2024/05/12
- Re: bug in bash, Andreas Kähäri, 2024/05/12
- Re: bug in bash, Kerin Millar, 2024/05/12
- Re: bug in bash,
Greg Wooledge <=
- Re: bug in bash, Andreas Schwab, 2024/05/12
- Re: bug in bash, Oğuz, 2024/05/12
- Re: bug in bash, Chet Ramey, 2024/05/13
- Re: bug in bash, Oğuz, 2024/05/13
- Re: bug in bash, Chet Ramey, 2024/05/14
- Re: bug in bash, Andreas Schwab, 2024/05/14
- Re: bug in bash, Chet Ramey, 2024/05/14
- Re: bug in bash, Chet Ramey, 2024/05/14