Re: Not successful if statements returning error code

2021-08-09 Thread Ahmad Fatoum
Hi, On 29.07.21 11:48, Denis Osterland-Heim wrote: > Hi, > > Am Donnerstag, den 29.07.2021, 11:22 +0200 schrieb Ahmad Fatoum: >> On 28.07.21 11:38, Denis Osterland-Heim wrote: >>> Hi, >>> >>> Am Mittwoch, den 28.07.2021, 10:56 +0200 schrieb Ahmad Fatoum: >>> I talked with Sascha once before

Re: Not successful if statements returning error code

2021-07-29 Thread Denis Osterland-Heim
Hi, Am Donnerstag, den 29.07.2021, 11:22 +0200 schrieb Ahmad Fatoum: > On 28.07.21 11:38, Denis Osterland-Heim wrote: > > Hi, > > > > Am Mittwoch, den 28.07.2021, 10:56 +0200 schrieb Ahmad Fatoum: > > > > > I talked with Sascha once before (off-list) about a similar issue. > > > Missing error han

Re: Not successful if statements returning error code

2021-07-29 Thread Ahmad Fatoum
On 28.07.21 11:38, Denis Osterland-Heim wrote: > Hi, > > Am Mittwoch, den 28.07.2021, 10:56 +0200 schrieb Ahmad Fatoum: > >> I talked with Sascha once before (off-list) about a similar issue. Missing >> error handling >> results in >> >> [ x1 -eq x2 ] && echo yes || echo no >> >> printing yes.

Re: Not successful if statements returning error code

2021-07-28 Thread Denis Osterland-Heim
Hi, Am Mittwoch, den 28.07.2021, 10:56 +0200 schrieb Ahmad Fatoum: > Hello Andrej, > > On 23.07.21 12:18, Andrej Picej wrote: > > Hi all, > > > > I have a question about Hush shell and the use of its conditional > > statements. > > We have come upon an interesting behaviour with its return values

Re: Not successful if statements returning error code

2021-07-28 Thread Ahmad Fatoum
Hello Andrej, On 23.07.21 12:18, Andrej Picej wrote: > Hi all, > > I have a question about Hush shell and the use of its conditional statements. > We have come upon an interesting behaviour with its return values. > > If the condition of the if statement is not true then the return value is 1 >

Re: Not successful if statements returning error code

2021-07-27 Thread Andrej Picej
Just saw that I forgot to mention the main reason, why this is important. We have a couple of boot scripts which end with if statements. If conditions of these if statements are not met then the boot script returns error code and the booting process is broken: Running script '/env/boot/mmc' f