Re: Arithmetic evaluation of negative numbers with base prefix

2019-06-19 Thread Chet Ramey
On 6/17/19 9:30 AM, Jeremy Townshend wrote: > Ilkka Virta's email helpfully pointed me to a somewhat related debate that > occurred about 11 months ago. I agree with your comment in this debate: > > "There would be a good case for rejecting the '10#' because it's missing > the value." I'll

Re: Arithmetic evaluation of negative numbers with base prefix

2019-06-19 Thread Chet Ramey
On 6/18/19 12:13 PM, Ilkka Virta wrote: > On 18.6. 18:20, Greg Wooledge wrote: >> On Tue, Jun 18, 2019 at 10:27:48AM -0400, Chet Ramey wrote: >>> $ ksh93 -c 'echo ${.sh.version}' >>> Version ABIJM 93v- 2014-09-29 >>> $ ksh93 -c 'echo $(( 10# ))' >>> ksh93:  10# : arithmetic syntax error >> >> I gue

Re: Arithmetic evaluation of negative numbers with base prefix

2019-06-19 Thread Chet Ramey
On 6/18/19 11:20 AM, Greg Wooledge wrote: > Seems kinda weird to continue calling it "ksh93" if it's being changed, > but I don't make the decisions. Korn once explained it as the "ksh93 language definition." So there are multiple implementations of that language. -- ``The lyf so short, the cra

How to tell Bash multiple values are success?

2019-06-19 Thread Jeffrey Walton
Hi Everyone, I have a systemd service that automatically applies updates. Looking at the service history, the service reports failure when it installs updates due to this: if dnf -y update &>/dev/null then echo "Upgraded system" else echo "Failed to upgrade system"

Re: How to tell Bash multiple values are success?

2019-06-19 Thread Greg Wooledge
On Wed, Jun 19, 2019 at 11:01:46AM -0400, Jeffrey Walton wrote: > if dnf -y update &>/dev/null > then > echo "Upgraded system" > else > echo "Failed to upgrade system" > exit 1 > fi > > The problems seems to be 0, 100 and 200 are success. When updates are >

Re: How to tell Bash multiple values are success?

2019-06-19 Thread Eli Schwartz
On 6/19/19 11:01 AM, Jeffrey Walton wrote: > Hi Everyone, > > I have a systemd service that automatically applies updates. Looking > at the service history, the service reports failure when it installs > updates due to this: > > if dnf -y update &>/dev/null > then > echo "Upgraded