Useful Commands/Arithmetic: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
(Created page with "{| class="wikitable" ! 情境 || 指令 |- | 計算整數 || <source lang="bash"> echo $((10+5)) </source> |- | 計算浮點數 || <source lang="bash"> bc <<< 'scale=3; 10/3'...")
(No difference)

Revision as of 03:41, 14 August 2018

情境 指令
計算整數
echo $((10+5))
計算浮點數
bc <<< 'scale=3; 10/3'
bc -l <<< '10/3'