当前位置:网站首页>Shell operator
Shell operator
2022-06-29 23:44:00 【Xiaojing, who likes dumplings】
declare Declare variable type
declare [+/-][ Options ] Variable name
-: Set the type of comfort for the variable
+: Remove the type attribute of a variable
-i: Declare a variable as an integer (integer)
-x: Declare a variable as an environment variable
-p: Displays the declared type of the specified variable
Numerical operation
Method 1
Use declare -i
aa=11
bb=22
declare -i cc=$aa+$bb
echo $cc
33
expr or let Numerical tools
aa=22
bb=33
dd=$(expr $aa + $bb)
echo $dd
55
( ( shipment count type ) ) or (( Arithmetic expression )) or (( shipment count type )) or [ Arithmetic expression ]
aa=33
bb=44
cc=$(($aa+$bb))
echo $cc
77
边栏推荐
猜你喜欢

matplotlib matplotlib可视化之柱状图plt.bar()

云服务器的安全设置常识

采购数智化爆发在即,支出宝“3+2“体系助力企业打造核心竞争优势

SQL question brushing 595 Big country

Sword finger offer 15 Number of 1 in binary

333333333333333333333333333333

Sword finger offer 13 Range of motion of robot

C指针进阶2-->函数指针数组 回调函数简化计算器代码,基于回调函数模拟实现qsort函数

Paper writing tool: latex online website
![[译]在软件开发行业工作 6 年后,那些年我曾改过的观念](/img/69/c9829b14223f1e8fd3137d0750d8f7.png)
[译]在软件开发行业工作 6 年后,那些年我曾改过的观念
随机推荐
正则表达式:字符(2)
Paper writing tool: latex online website
C pointer advanced 1-- > character pointer, array pointer, pointer and array parameter transfer, function pointer
手机开户一般哪个证券公司好?另外,手机开户安全么?
Solr基础操作2
flutter 插件版本冲突的解决方法
Start harvesting! Nailing: adjust the maximum number of free users of "nailing team". If the number exceeds 10, it will not work normally
按头安利!好看又实用的电机 SolidWorks模型素材看这里
Leetcode(633)——平方数之和
Test d'installation du cluster metaq
Is China Merchants Securities reliable? Is it safe to open a stock account?
基金的利润分配与税收
LC:有效的数独 + 旋转图像
HPE launched ARM CPU general server product
基金的估值,费用,会计核算
“微博评论”的高性能高可用计算架构
xutils3传集合
On binary tree
小程序插件接入、开发与注意事项
Solution to version conflict of flutter plug-in