Re: A note for read builtin

2010-06-17 Thread Marc Herbert
Le 16/06/2010 19:03, Greg Wooledge a écrit : > On Wed, Jun 16, 2010 at 07:47:03PM +0200, Krzysztof ??elechowski wrote: >> The description of the read builtin [19] would benefit of the following note: >> Warning: A pipeline of the form { echo 1 2 | read a b; } is not useful. Use >> { >> read<<<"1

Re: A note for read builtin

2010-06-17 Thread Roman Rakus
On 06/17/2010 10:28 AM, Marc Herbert wrote: - The POSIX standard does allow "echo 1 2 | read a b" to be useful (cf. 2.12 "Shell Execution Environment"). Some alternatives to bash actually make it useful. Standard and portability concerns definitely belong to a reference manual. Mayb

Re: A note for read builtin

2010-06-17 Thread Marc Herbert
>> - The POSIX standard does allow "echo 1 2 | read a b" to be useful >>(cf. 2.12 "Shell Execution Environment"). > Maybe the POSIX expect shell to execute the last command of pipeline > not in subshell. >From section 2.12 and from messages posted here in the past I understand that POSIX

Re: A note for read builtin

2010-06-17 Thread Jan Schampera
Marc Herbert schrieb: From section 2.12 and from messages posted here in the past I understand that POSIX allows either one. This ambiguity reinforces the need for documentation IMHO. I agree with Greg here, it's a well known "don't". What should be documented is (maybe it is?) how pipelines