After some greping and seding I manage to get a value from a csv cell and assign it to a variable (DBR).
Here come some odd findings
echo $DBR
echo "$DBR",
printf "%f" $DBR
output:
9.1
,.1
: invalid numbersh: line 25: printf: 9.1
After some greping and seding I manage to get a value from a csv cell and assign it to a variable (DBR).
Here come some odd findings
echo $DBR
echo "$DBR",
printf "%f" $DBR
output:
9.1
,.1
: invalid numbersh: line 25: printf: 9.1
Your greping and seding has failed to remove a trailing carriage return from the value of DBR (perhaps originating from DOS-style line endings in the original CSV file).
Ex. given
$ printf -vDBR '9.1\r'
$ echo "$DBR" | xxd
00000000: 392e 310d 0a 9.1..
then
$ echo $DBR
9.1
$ echo "$DBR",
,.1
$ printf '%f\n' "$DBR"
: invalid number1
0.000000