Re: Shell script silently exits. Why?

2016-11-29 Thread Cristian Ionescu-Idbohrn
On Tue, 29 Nov 2016, Pavel A wrote: > > Is it possible to test for active option within ash script? > My version of ash does not seem to recognize "test -o" or [ -o errexit ] To test on errexit you'd do something like: case $- in *e*) echo errexit

Re: Shell script silently exits. Why?

2016-11-29 Thread Pavel A
Apologies for late response and thanks for everyone who pointed to the behavior of let command with zero result. Is it possible to test for active option within ash script? My version of ash does not seem to recognize "test -o" or [ -o errexit ] Grepping my scripts does not find the -e option

Re: Shell script silently exits. Why?

2016-11-18 Thread Ralf Friedl
Arnout Vandecappelle wrote: I guess you have a 'set -e' somewhere in your script? let returns the value it computed, so if $foo is different from 0, it will return non-0. This causes the shell to exit. It's POSIX behaviour. Bash "let" returns 1 if there is a sytax error within the

Re: Shell script silently exits. Why?

2016-11-18 Thread Arnout Vandecappelle
On 17-11-16 16:43, Pavel A wrote: > Dear experts, > > We have a strange problem with ash script: the shell silently exits while > executing a script. It is likely caused by a "let" command. > Anyone seen similar behavior? How to debug it? > > Busybox version is 1.22.1 (this is what it prints

Shell script silently exits. Why?

2016-11-17 Thread Pavel A
Dear experts, We have a strange problem with ash script: the shell silently exits while executing a script. It is likely caused by a "let" command. Anyone seen similar behavior? How to debug it? Busybox version is 1.22.1 (this is what it prints out, not sure about configuration and build