bcshell
来自「su 的源代码库」· 代码 · 共 31 行
TXT
31 行
# sample showing loop counting with expr and arithmetic with bc#! /bin/sh# initialize valuesi=0j=0k=0# beginning of loopwhile [ "$i" -ne "6" ]do echo "i=$i j=$j k=$k" # compute j = $i/2 j=`bc -l <<-END scale=4 $i / 2 END` # compute k = $i * $j k=`bc -l <<-END scale=4 $i * $j END` # compute update loop counter i=`expr $i + 1`doneexit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?