#! /bin/bash
echo "please input one..."
read x
echo "please input two..."
read y
sum = $(($x+$y))
echo "sum is $sum"
read -p "please input one:" x
read -p "please input tow:" y
sum = $(($x+$y))
echo "sum is $sum"
建议脚本放在/usr/local/bin目录下
#! /bin/bash
echo "please input one..."
read x
echo "please input two..."
read y
sum = $(($x+$y))
echo "sum is $sum"
read -p "please input one:" x
read -p "please input tow:" y
sum = $(($x+$y))
echo "sum is $sum"
建议脚本放在/usr/local/bin目录下