bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read bultin is broken when used with pipes


From: Chet Ramey
Subject: Re: read bultin is broken when used with pipes
Date: Thu, 21 Sep 2000 14:30:40 -0400

> Machine Type: i386-pc-linux-gnu
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
>       in my opinion, the bash builtin 'read' does not work as it should.
>               echo Hello world | read a b 
>               echo $a 
>       should print Hello
>       When read is used in pipes with bash, it never reads anything.
>       Is this according to any specification?

Yes.  Read the Bash FAQ, question E4, and POSIX.2 section 3.12.

>       I really love the read command, this renders bash completly
>       useless for scripting for me... other shells like SysV bourne
>       shell and korn shell do it 'the right way'.

The real System V bourne shell does it as bash does.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]