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 ...
随机推荐
- css让浮动元素水平居中
对于定宽的非浮动元素我们可以用 margin:0 auto; 进行水平居中. 对于不定宽的浮动元素我们也有一个常用的技巧解决它的水平居中问题.如下: HTML 代码: <div class=&q ...
- python中property干什么用的?
先来段官方文档压压惊.. property(fget=None, fset=None, fdel=None, doc=None) Return a property attribute. fget i ...
- Linux环境安装Jenkins
安装环境: CenOS 6.4 JDK_1.6.0_23 一.安装前检查环境 检查是否安装JDK: java --version 二.安装Jenkins 1. 添加Jenkins的源(reposito ...
- Volley(五)—— 自定义Request
详细解读Volley(四)—— 自定义Request Volley中提供了几个Request,如果我们有特殊的需求,完全可以自定义Request的,自定义Request自然要继承Request,那么本 ...
- css常用中文字体的英文名称写法
我们知道网页中使用中文字体最好用其对应的英文名称,这样可以避免出现编码问题导致样式中的中文名称出现乱码,从而不识别.下面是网页中常用的中文字体所对应的英文名称.留着,不用翻资料了 中文 英文 宋体 S ...
- f2fs解析(八)node 管理器中的node_info
free_info 功成身退,node_info顺利接班. // 这里还是蛮复杂的一件事,如果不搞清除的话,这个历史性的接班工作我们就接不上 上面说到 alloc_nid 和 alloc_nid_do ...
- 025医疗项目-模块二:药品目录的导入导出-HSSF导入类的封装
上一篇文章提过,HSSF的用户模式会导致读取海量数据时很慢,所以我们采用的是事件驱动模式.这个模式类似于xml的sax解析.需要实现一个接口,HSSFListener接口. 原理:根据excel底层存 ...
- FusionCharts参数的详细说明和功能特性(转)
功能特性animation 是否动画显示数据,默认为1(True)showNames 是否显示横向坐标轴(x轴)标签名称ro ...
- Android的Drawable缓存机制源码分析
Android获取Drawable的方式一般是Resources.getDrawable(int),Framework会返回给你一个顶层抽象的Drawable对象.而在Framework中,系统使用了 ...
- wooyun本地数据抓取
---- #-*-coding:utf-8-*- import re import urllib import MySQLdb import time from urllib import unquo ...