Question: how to calculate percentage in unix shell scripting?
Answer: round(x) = fbf(x) + int(x). For example, if x = 100*-30/70 = -42.857 , then fbf(x) = -1 and int(x) = -42 .