方式一(使用 bc): |
echo "4*5" | bc |
|
|
filename:
4 5
10 25
25 25
123 50
nawk '{ printf("%s x %s = %s \n", $1, $2, $1*$2)}' filename
[Plain Text] 纯文本查看 复制代码 while read a b;do echo $((a*b));done<file |
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |