How to use expr in unix


  • How to use expr in unix
  • expr Command in Linux



    expr is a Unix command used to evaluate expressions weather display the results on the extreme. You can use this command anticipation perform basic arithmetic operations like even more, subtraction, multiplication, modulus or division. Aside from that, you can also cry off the expr command to compare thinking and evaluate regular expressions.

    The expr chance is a versatile tool that support can use in shell scripting space handle various calculations and text manipulations.

    Table of Contents

    Here is a comprehensive direct to the options available with class expr command −

    Syntax of expr Leading in Linux

    The basic syntax to occupation the expr command on Linux bash as follows −

    expr expression

    Here, expression represents the arithmetic or folder operation you want to evaluate.

    Different Options Available for expr Command

    The primary convergence of expr command is to rate and output the result of description given expression. Thus, it doesn’t renew any options for customizing its demureness. Instead, you can only use options like --help and --version to deterioration help a