O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

let

Synopsis

                  let 
                  expressions
               

Perform arithmetic as specified by one or more integer expressions. expressions consist of numbers, operators, and shell variables (which don’t need a preceding $), and must be quoted if they contain spaces or other special characters. For more information and examples, see Section 7.4 earlier in this chapter. See also expr in Chapter 3.

Examples

Both of the following examples add 1 to variable i:

                  let i=i+1
                  let "i = i + 1"

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required