OS: fedora 34 workstation, GNU/Linux I am confused. In the decimal module documentation section “Rounding modes” says, I have an example I was expecting as result 25.25 because the sum results in n1 = 25.2555 has a 5 in the thousandths position, then must go DOWN to 0 and the hundredths position remain the same. Am I wrong? why I
Tag: decimal
Only accept 4 character long, decimal numbers as user input for read
I am writing a small script to easily capture weights, which are taken from user input with read -p. I want all captured weights to be 4 characters long, decimal numbers in the format XX.X. For example 30.2 kg. How can I make sure users can only input decimal numbers in that format? Thank you for your help. Answer One
bash printf not working – decimals [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 4 years ago. Improve this question
how to replace decimal in linux
I have a csv file with error in one field, the fields are separated by “,” but the error is in decimal field, for example 34.25,” i need replace by 34.25″,”. Search ,” and replace by “,” is not option, others fields will modified. Answer Check that the character before ,” is not a double quote, and if it’s not,