如图,我的vim中shell脚本写好了,为什么到最后bash后echo中的输出值为0?
#!/bin/bash read -p "请输入头的数字:" head read -p "请输入尾的数字:" foot rabbit=$[( foot-head-head)/2] chicken=$[head-rabbit] echo "鸡的数量是:$chicken" echo "兔的数量是:$rabbit"