当前位置:网站首页>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
边栏推荐
- 我想知道今天还可以开户么?另外想问,现在在线开户安全么?
- Pain points and solutions of M1 notebook home office | community essay solicitation
- LC: maximum subarray and
- CE第二次作业
- Collection! Have you ever used these tools to improve programmer productivity?
- RRDTOOL draws MRTG log data
- 除子
- 6.28日刷题题解
- AI empowers new retail, the way to win "wisdom" lies in ecological thinking | selected excerpts from digital intelligence night talk live broadcast
- 正则表达式:字符(2)
猜你喜欢

Redis client

Use of jetpack's room in combination with flow

这个简单的小功能,半年为我们产研团队省下213个小时

Software testing interface testing postman testing tool interface testing process execution interface testing interface associated environment variables and global variables built-in dynamic parameter
![[译]在软件开发行业工作 6 年后,那些年我曾改过的观念](/img/69/c9829b14223f1e8fd3137d0750d8f7.png)
[译]在软件开发行业工作 6 年后,那些年我曾改过的观念

Collection! Have you ever used these tools to improve programmer productivity?

Yunhe enmo Guoqiang, identifiez - le, saisissez - le, avant l'ébullition de la base de données nationale

云和恩墨盖国强,识别它、抓住它,在国产数据库沸腾以前

Constexpr function

开始“收割”!钉钉调整“钉钉Teambition”免费用人数上限,超十人将无法正常用
随机推荐
InfluxDB时序数据库系统
Halcon实用:焊点检出设计思路
LC: maximum subarray and
云服务器的安全设置常识
LC:有效的数独 + 旋转图像
Is it safe to open a stock account? Shanghai stock account opening.
机器学习:VC维的概念和用途
Leetcode(76)——最小覆盖子串
小程序插件接入、开发与注意事项
采购数智化爆发在即,支出宝“3+2“体系助力企业打造核心竞争优势
Sword finger offer 15 Number of 1 in binary
【一起上水硕系列】Day 8
手机开户一般哪个证券公司好?另外,手机开户安全么?
除子
为什么 JSX 语法这么香?
基金的信息披露
Matplotlib histogram of Matplotlib visualization plt bar()
Xutils3 transfer set
Yunhe enmo, gaiguoqiang, identify it and grasp it before the domestic database boils
Solr基础操作2