I'm writing a simple bash script. I have just started learning about writing these,
but I have found a need for something, so I set out to do it. The problem is with
Here is my script:
echo "What is the Red value?"
echo "What is the Green value?"
echo "What is the Blue value?"
echo "The values are now..."
echo "$r1, $g1, $b1"
The problem is that since most of the time, the ending values will be less then 1,
it gets rounded down to zero instead of a decimal. I want the output to be
fractional to 2 decimal places (example - 64/256 = 0.25)
The 2 beginners guides I have do not reference this. I tried searching on line in
advanced guides, but got lost... fast.
I'm sure it has to do with how I am having it caclulate r1, g1, & b1, but I can't find it.
Any script savy people out there willing to help?
Thanks in advance