Home > OS >  Shell scripts decimal point problem
Shell scripts decimal point problem

Time:09-23

Bosses, shell scripts, a variable for the decimal circular statement, how to use the BC for processing?

CodePudding user response:

I am made of gawk such as
Num=` gawk - v x=y=$$fx1 - v fx2 'BEGIN {printf "%. 5 f \ n", x/y}' `

CodePudding user response:

Uh huh! Thank you for your answer! One who taught me yesterday, loop variable expanded 10 or one hundred times, the loop body, into another variable, using the BC processing! Still very thank you for your reply!

CodePudding user response:

reference 1st floor wwys response:
I was made of the gawk for example
Num=` gawk - v x=y=$$fx1 - v fx2 'BEGIN {printf "%. 5 f \ n", x/y}' `

Uh huh! Thank you for your answer! One who taught me yesterday, loop variable expanded 10 or one hundred times, the loop body, into another variable, using the BC processing! Still very thank you for your reply!
  • Related