From f381909fdf37dff7aba636047d03aee5d5c1c2cd Mon Sep 17 00:00:00 2001 From: "johnny.liu" Date: Mon, 27 Nov 2017 23:58:25 +0800 Subject: [PATCH] Add bc to Everyday use section --- README-zh.md | 11 +++++++++++ README.md | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/README-zh.md b/README-zh.md index 381397b..528abda 100644 --- a/README-zh.md +++ b/README-zh.md @@ -201,6 +201,17 @@ >>> 2+3 5 ``` +另一个方法是bc (如果你的系统上没有安装python的话) +``` +echo "2+3"|bc +5 +``` +Specify scale for accuracy control purpse. +指定scale参数可以控制计算精度 +``` +echo "scale=4;9/7"|bc +1.2857 +``` ## 文件及数据处理 diff --git a/README.md b/README.md index 95ee29d..d41ed9f 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,16 @@ Notes: >>> 2+3 5 ``` +Another approach is to use bc, in case you have no python installed in your system. +``` +echo "2+3"|bc +5 +``` +Specify scale for accuracy control purpse. +``` +echo "scale=4;9/7"|bc +1.2857 +``` ## Processing files and data