How do I divide in the Linux console?

后端 未结 12 1989
情话喂你
情话喂你 2020-12-25 10:41

I have to variables and I want to find the value of one divided by the other. What commands should I use to do this?

12条回答
  •  萌比男神i
    2020-12-25 11:11

    I assume that by Linux console you mean Bash.

    If X and Y are your variables, $(($X / $Y)) returns what you ask for.

提交回复
热议问题