請問如何在script中 顯示小數點 - Linux

By Joe
at 2010-11-10T14:42
at 2010-11-10T14:42
Table of Contents
sum=`expr $sum / $time`
echo "$sum $time"
請問現在我想要取sum到小數第一位
該如何時做呢
我上網查了一下
sum=`echo "scale=1;$temp" | bc`
找到上面這行
但是在shell內似乎不起作用
爬文搜尋了幾個關鍵字 也找不到相關的問題
不知道我搜尋錯了關鍵字= =
--
echo "$sum $time"
請問現在我想要取sum到小數第一位
該如何時做呢
我上網查了一下
sum=`echo "scale=1;$temp" | bc`
找到上面這行
但是在shell內似乎不起作用
爬文搜尋了幾個關鍵字 也找不到相關的問題
不知道我搜尋錯了關鍵字= =
--
Tags:
Linux
All Comments

By Vanessa
at 2010-11-12T01:27
at 2010-11-12T01:27

By Todd Johnson
at 2010-11-15T15:28
at 2010-11-15T15:28

By David
at 2010-11-17T16:43
at 2010-11-17T16:43

By Todd Johnson
at 2010-11-22T02:52
at 2010-11-22T02:52

By Robert
at 2010-11-23T10:51
at 2010-11-23T10:51

By Todd Johnson
at 2010-11-26T11:29
at 2010-11-26T11:29
Related Posts
多點觸控板

By Irma
at 2010-11-09T23:03
at 2010-11-09T23:03
Ubuntu 10.10修改語系

By Callum
at 2010-11-09T21:17
at 2010-11-09T21:17
ppstream for linux出了

By Cara
at 2010-11-09T20:22
at 2010-11-09T20:22
請問linux的桌面日曆…我想要橫列的…

By Ina
at 2010-11-09T19:01
at 2010-11-09T19:01
11/12、15 Linux 網路卡驅動程式運作原理

By Sarah
at 2010-11-09T17:36
at 2010-11-09T17:36