读书人

linux 内建授命 let

发布时间: 2012-11-05 09:35:12 作者: rapoo

linux 内建指令 let
内建指令 let


linux let命令
let(1) - 算 (bash shell 建指令)
法:
bash
let arg [arg ...]
明:
let 是 bash 建的整算。arg 代表算式。

得到的值 0,回值 1,其他值,回值 0。

例明:
的(不要偷笑)

#!/bin/bash
let a=5+4 b=9-3
echo $a $b


再一

#!/bin/bash
let "t1 = ((a = 5 + 3, b = 7 - 1, c = 15 - 4))"
echo "t1 = $t1, a = $a, b = $b"


好了,到此。

读书人网 >UNIXLINUX

热点推荐