YouTip LogoYouTip

Linux Comm Let

# Linux let Command [![Image 3: Linux Command Manual](#) Linux Command Manual](#) ## Command: let The `let` command is a tool for arithmetic in BASH, used to evaluate one or more expressions. In variable calculations, you do not need to use `$` to represent the variable. If the expression contains spaces or other special characters, it must be quoted. ### Syntax Format let arg [arg ...] ### Parameter Description: arg: The expression to be evaluated. ### Examples: Increment operation: **let no++** Decrement operation: **let no--** Shorthand forms **let no+=10, let no-=20** are equivalent to **let no=no+10, let no=no-20** respectively. The following example calculates the two expressions `a` and `b`, and outputs the results: #!/bin/bashlet a=5+4let b=9-3 echo $a $b The execution result of the above example is: 9 6 [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Prop Style FilterLinux Comm Let β†’