Hello Guys,
I have a floating point number 1.14475E+15 I want to convert this number in to full number (Integer or Big integer). I tried couple of functions it did not work. When I use INT=${FLOAT/.*} I am getting value as 1. I don't want a truncated value
#!/bin/bash
# Welcome to the Interactive Shell Tutorial.
# Start by choosing a chapter and
# write your code in this window.
FLOAT=1.14475E+15
#INT=${FLOAT/.*}
#INT=${FLOAT/\.*}
S = INT(1.14475E+15)
echo $S
Okay, you've showed us what you don't want, but I can't tell what you do want. What would a "good" result look like?
Shell does not understand floating point numbers. You'll have to pipe it into bc or awk or some other program/tool/language which does.
There are a lot of syntax errors in your code, also. You can't do X = value you have to do X=value Also there is no INT( ) function in bash. Besides which, functions don't even work that way in bash.
Thank you for the reply. I want to know what is the total number like 1,144,750,000,000,000. I do not know what the right value.. but some thing like that.