Linux let 命令

更新时间: 2019-10-16 12:40

命令:let

let 命令是 BASH 中用于计算的工具,用于执行一个或多个表达式,变量计算中不需要加上 $ 来表示变量。如果表达式中包含了空格或其他特殊字符,则必须引起来。

语法格式

let arg [arg ...]

参数说明:

arg:要执行的表达式

实例:

自加操作:let no++

自减操作:let no--

简写形式 let no+=10,let no-=20,分别等同于 let no=no+10,let no=no-20

以下实例计算 a 和 b 两个表达式,并输出结果:

#!/bin/bash

let a=5+4
let b=9-3 
echo $a $b

以上实例执行结果为:

9 6
Introduction to Linear Optimization

Introduction to Linear Optimization

Dimitris Bertsimas、John N. Tsitsiklis / Athena Scientific / 1997-02-01 / USD 89.00

"The true merit of this book, however, lies in its pedagogical qualities which are so impressive..." "Throughout the book, the authors make serious efforts to give geometric and intuitive explanations......一起来看看 《Introduction to Linear Optimization》 这本书的介绍吧!

URL 编码/解码

URL 编码/解码

URL 编码/解码

html转js在线工具

html转js在线工具

html转js在线工具

HEX CMYK 转换工具

HEX CMYK 转换工具

HEX CMYK 互转工具