Follow-up Comment #5, bug #66479 (group groff): Hi Branden!
Sorry for comming back to you on this so late, I caught a cold and was unable
to respond earlier.
Unfortunately, your fix does not work for me, see the attached
test-suite.log.
I figure from the output, that `expr` is not able to perform the arithmetic
operation,
you are requesting:
expr: not a decimal number: ' 46'
I think, you wanted `expr`to coerce (right term?) the string into an integer
by
performing the addition on the first operand, right?
res=$(expr "$res" + 0) || exit 99
I tried this also on an archlinux system I have available, where a coreutils
`expr` is
installed:
MANWIDTH=72 man expr | tail -n11
COPYRIGHT
Copyright © 2024 Free Software Foundation, Inc. License GPLv3+:
GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute
it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
Full documentation <https://www.gnu.org/software/coreutils/expr>
or available locally via: info '(coreutils) expr invocation'
GNU coreutils 9.5 August 2024 EXPR(1)
There, I get the same result:
export res=" 66"; expr "$res" + 0
expr: non-integer argument
Please, let me know, if I can be of any further assistence!
Cheers
Sven
(file #56657)
_______________________________________________________
Additional Item Attachment:
File name: test-suite.log Size: 5KiB
<https://file.savannah.gnu.org/file/test-suite.log?file_id=56657>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-f13d333523abc00b8bb10e20cbe61e83bc26ec2a.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66479>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
