Re: bash exit command should be unconditional

2010-04-07 Thread Bob Proulx
Vadym Chepkov wrote: > I found out a very unusual feature of bash which makes it to act > really unexpected. I understand that pipelines are executed in a > separate subshell, but I really think 'exit' command should be > absolute. Consider a trivial code: Note that dash also behaves this way too.

Re: bash exit command should be unconditional

2010-04-07 Thread Jan Schampera
Vadym Chepkov schrieb: > I would expect never see "Continue" printed The 'exit' command exits the subshell you just created. http://bash-hackers.org/wiki/doku.php/scripting/processtree There's also a FAQ about it, E4. Jan

bash exit command should be unconditional

2010-04-07 Thread Vadym Chepkov
Hi, I found out a very unusual feature of bash which makes it to act really unexpected. I understand that pipelines are executed in a separate subshell, but I really think 'exit' command should be absolute. Consider a trivial code: #!/bin/bash echo Start ps -ef | while read proc do echo $proc

Re: Can arithmetic evaluation trap more than just division by zero?

2010-04-07 Thread Chet Ramey
> On 04/06/2010 01:29 PM, Roman Rakus wrote: > > Is it possible to add more traps to arithmetic evaluation? > Initially I wanted answer for this question :) I'm not convinced of the need. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis''

Re: Can arithmetic evaluation trap more than just division by zero?

2010-04-07 Thread Roman Rakus
On 04/06/2010 01:29 PM, Roman Rakus wrote: Is it possible to add more traps to arithmetic evaluation? Initially I wanted answer for this question :) RR