Computing addition, subtraction, multiplication, division in linux scripts

Source: Internet
Author: User
Computing, subtraction, multiplication, division, linux general technology-Linux programming and kernel information in a Linux script. The following is a detailed description. In linux, the addition, subtraction, multiplication, division, is actually a small program named "expr ". This program is very easy to use, but it should be noted that do not forget to use space and escape. For example, to calculate the multiplication of two numbers, you should write it like this:

Expr 1024 \ * 1024

In fact, it is quite simple. I have a good reference document here. This program can not only calculate addition, subtraction, multiplication, division, but also many expressions that can calculate the results.

Expr command: http://study.chyangwa.com/IT/AIX/aixcmds2/expr.htm
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.