代码
#! /bin/bash
read -p "INterest " interest
read -p "Enter loan " loan
tot(){
total=$( bc -l <<EOF
scale=3
$loan + $interest^3
EOF
)
echo "$total"
}
tot
输出 兴趣12 输入贷款12 ./eofp.sh:第6行:寻找匹配的')'时出现意外的EOF ./eofp.sh:第15行:语法错误:文件意外结束