Bug in bash? different from ksh, at any rate...

2011-05-28 Thread Rick Thomas
Can anybody explain this difference between the behavior of bash and ksh? When reading the man page, I would expect both of them to have the behavior exhibited by ksh. Why does bash seem to treat return like a single level break in this context? The echo $AA | while read is important

Re: Bug in bash? different from ksh, at any rate...

2011-05-28 Thread David Sastre
On Sat, May 28, 2011 at 01:14:42AM -0700, Rick Thomas wrote: Can anybody explain this difference between the behavior of bash and ksh? When reading the man page, I would expect both of them to have the behavior exhibited by ksh. Why does bash seem to treat return like a single level break

Re: Bug in bash? different from ksh, at any rate...

2011-05-28 Thread Sven Joachim
On 2011-05-28 10:14 +0200, Rick Thomas wrote: Can anybody explain this difference between the behavior of bash and ksh? It depends on whether the shell starts a subshell for (compound) commands in pipelines. When reading the man page, I would expect both of them to have the behavior

Re: Bug in bash? different from ksh, at any rate...

2011-05-28 Thread Rick Thomas
On May 28, 2011, at 2:47 AM, David Sastre wrote: On Sat, May 28, 2011 at 01:14:42AM -0700, Rick Thomas wrote: Can anybody explain this difference between the behavior of bash and ksh? When reading the man page, I would expect both of them to have the behavior exhibited by ksh. Why does bash