shell/基本脚本/使用expr执行数学运算.sh

9 lines
121 B
Bash

#!/bin/bash
#An example of using the expr command
var1=10
var2=20
var3=`expr $var2 / $var1`
echo "The result is $var3"