Mathematical operation
(1)Using let
let result=2+1
let result=2-1
let result=2*1
let result=2/1
(2) Using bracket
echo $(($p1+$p2))
OR sum=$(($p1+$p2))
echo $sum
(3) Using ` and expr
1.乘号(*), 左括号( ( ) , 右括号( ) )必须使用反斜杠(\)转义。
2.expr右边以及运算符和括号的两边必须有空格
result=`expr 4 + 2`
result=`expr 4 - 2`
result=`expr 4 \* 2`
result=`expr 4 / 2`
result=`expr 4 % 2`
result=`expr \( 4 - 2 \) \* 2` (注意两项的综合运用)
Mathematical operation的更多相关文章
- Theano Graph Structure
Graph Structure Graph Definition theano's symbolic mathematical computation, which is composed of: A ...
- linux shell program summary
from:Sep 23 2016 mathematical operation: floating number,bc calculator: we can also use bc in shell ...
- Deep Learning in a Nutshell: Core Concepts
Deep Learning in a Nutshell: Core Concepts This post is the first in a series I’ll be writing for Pa ...
- (转) Deep Learning in a Nutshell: Core Concepts
Deep Learning in a Nutshell: Core Concepts Share: Posted on November 3, 2015by Tim Dettmers 7 Comm ...
- Understanding Convolution in Deep Learning
Understanding Convolution in Deep Learning Convolution is probably the most important concept in dee ...
- 深度卷积神经网络用于图像缩放Image Scaling using Deep Convolutional Neural Networks
This past summer I interned at Flipboard in Palo Alto, California. I worked on machine learning base ...
- General Purpose Hash Function Algorithms
General Purpose Hash Function Algorithms post@: http://www.partow.net/programming/hashfunctions/inde ...
- RESTful Web Services: A Tutorial--reference
As REST has become the default for most Web and mobile apps, it's imperative to have the basics at y ...
- [转载] Conv Nets: A Modular Perspective
原文地址:http://colah.github.io/posts/2014-07-Conv-Nets-Modular/ Conv Nets: A Modular Perspective Posted ...
随机推荐
- 内网穿透利器 Ngrok 使用教程
ngrok 服务可以分配给你一个域名让你本地的web项目提供给外网访问,特别适合向别人展示你本机的web demo 以及调试一些远程的API (比如微信公众号,企业号的开发) 下面开始教程 Step ...
- html5实现微信摇一摇功能
在HTML5中,DeviceOrientation特性所提供的DeviceMotion事件封装了设备的运动传感器时间,通过改时间可以获取设备的运动状态.加速度等数据(另还有deviceOrientat ...
- C#带cookie Post和Get方式发送数据,保持cookie
在实际编程中,可能需要读取特定网页的信息,但很多网站需要用户登录后,才能够获取相关的页面内容,这就需要编程者先临时存储当前的cookie,在C#中可以使用CookieContainer 对象来保存登录 ...
- jquery堆栈与队列
期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待期待
- Go 命令之 godep
本文参考:http://www.cnblogs.com/me115/p/5528463.html#h20 http://studygolang.com/articles/4385 关于Godep 发现 ...
- 微软职位内部推荐-SW Engineer II for Skype
微软近期Open的职位: We are the Skype Beijing team. Skype division drives the communications strategy for Mi ...
- [IPSEC PKI]
PKI: 对称加密 非对称加密(混合加密) 数字签名 理论概述: (1)预备知识 对称加密:加密密钥和揭秘蜜钥是同一个密钥 缺点:不适合在互联网上传输密钥 密钥维护工作量大 n(n-1)/2 : ...
- Spring中Bean的命名问题(id和name区别)及ref和idref之间的区别
Spring中Bean的命名 1.每个Bean可以有一个id属性,并可以根据该id在IoC容器中查找该Bean,该id属性值必须在IoC容器中唯一: 2.可以不指定id属性,只指定全限定类名,如: & ...
- web前端开发资源整理
webpack中文文档 http://webpackdoc.com/index.html 饿了么UI http://mint-ui.github.io/#!/zh-cn http://element. ...
- MSMQ消息队列安装
一.Windows 7安装.管理消息队列1.安装消息队列 执行用户必须要有本地 Administrators 组中的成员身份,或等效身份. 具体步骤: 开始—>控制面板—>程 ...