Re: ksh(1): preserve xtrace option

2017-01-16 Thread frantisek holop
Anton Lindqvist, 16 Jan 2017 10:02: > > Hmm, I see now that my memory is false, ksh93 (available as port) does > > trace into functions. Still, I'm undecided if we want to change our > > ksh. > > Any thoughts from others on changing the defaults? just my 2 cents. when many years ago i found out t

Re: ksh(1): preserve xtrace option

2017-01-16 Thread Anton Lindqvist
On Fri, Jan 13, 2017 at 10:56:51AM +0100, Otto Moerbeek wrote: > On Fri, Jan 13, 2017 at 10:20:19AM +0100, Otto Moerbeek wrote: > > > On Fri, Jan 13, 2017 at 09:51:51AM +0100, Otto Moerbeek wrote: > > > > > On Fri, Jan 13, 2017 at 09:46:54AM +0100, Anton Lindqvist wrote: > > > > > > > Consider t

Re: ksh(1): preserve xtrace option

2017-01-13 Thread Otto Moerbeek
On Fri, Jan 13, 2017 at 10:20:19AM +0100, Otto Moerbeek wrote: > On Fri, Jan 13, 2017 at 09:51:51AM +0100, Otto Moerbeek wrote: > > > On Fri, Jan 13, 2017 at 09:46:54AM +0100, Anton Lindqvist wrote: > > > > > Consider the following script which calculates the sum of the first N > > > integers re

Re: ksh(1): preserve xtrace option

2017-01-13 Thread Otto Moerbeek
On Fri, Jan 13, 2017 at 09:51:51AM +0100, Otto Moerbeek wrote: > On Fri, Jan 13, 2017 at 09:46:54AM +0100, Anton Lindqvist wrote: > > > Consider the following script which calculates the sum of the first N > > integers recursively: > > > > $ cat >sum.sh < > sum() { > > [ $1 -eq 0 ] && echo $2

Re: ksh(1): preserve xtrace option

2017-01-13 Thread Otto Moerbeek
On Fri, Jan 13, 2017 at 09:46:54AM +0100, Anton Lindqvist wrote: > Consider the following script which calculates the sum of the first N > integers recursively: > > $ cat >sum.sh < sum() { > [ $1 -eq 0 ] && echo $2 || sum $(($1 - 1)) $(($2 + $1)) > } > > sum 5 > ! > > Executing the script wit

ksh(1): preserve xtrace option

2017-01-13 Thread Anton Lindqvist
Consider the following script which calculates the sum of the first N integers recursively: $ cat >sum.sh