- You're missing
then
after elif
- You cannot do floating point math in bash.
You can use this script:
#!/bin/bash
read -p "Please enter the how much sales you have done: " sales
if [ $sales -le 5000 ]; then
pp='0.25'
elif [ $sales -le 10000 ]; then
pp='0.1'
elif [ $sales -le 20000 ]; then
pp='0.15'
elif [ $sales -le 40000 ]; then
pp='0.2'
else
pp='0.25'
fi
echo "your profit is " $(bc -l <<< "$sales * $pp")