[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: condition to execute
From: |
David |
Subject: |
Re: condition to execute |
Date: |
Tue, 6 Jul 2021 13:13:42 +1000 |
On Tue, 6 Jul 2021 at 13:00, <lisa-asket@perso.be> wrote:
> > > (( $f == 1 )) && source ${HOME}/.bashrc
> > A relatively minor consideration is that this list has a nonzero
> > exit status if f != 1. This suggests failure, even if it is not
> > actually a failure condition.
> What do you mean by a failure?
Restating what is written above:
"has a nonzero exit status"
Read about it here:
http://mywiki.wooledge.org/BashGuide/TestsAndConditionals#Exit_Status
Demo:
$ f=0; (( f == 1 )); echo $?
1
$ f=1; (( f == 1 )); echo $?
0
- condition to execute, lisa-asket, 2021/07/05
- Re: condition to execute, Lawrence Velázquez, 2021/07/05
- condition to execute, lisa-asket, 2021/07/05
- Re: condition to execute,
David <=
- condition to execute, lisa-asket, 2021/07/05
- Re: condition to execute, Greg Wooledge, 2021/07/06
- condition to execute, lisa-asket, 2021/07/06
- Re: condition to execute, Lawrence Velázquez, 2021/07/06
- condition to execute, lisa-asket, 2021/07/06
- Re: condition to execute, Lawrence Velázquez, 2021/07/06
- Re: condition to execute, Eli Schwartz, 2021/07/06
- Re: condition to execute, Greg Wooledge, 2021/07/06
- condition to execute, lisa-asket, 2021/07/06