How do I divide in the Linux console?

后端 未结 12 2007
情话喂你
情话喂你 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条回答
  •  一个人的身影
    2020-12-25 11:23

    You can use awk which is a utility/language designed for data extraction

    e.g. for 1.2/3.4

    >echo 1.2 3.4 | awk '{ print $2/$1 }'
    0.352941
    

提交回复
热议问题