variable1=$1 novotes=0 yesvotes=`cat yes_votes.tx` echo $yesvotes if [ $variable1 ="yes" ]; then echo "yes" $yesvotes = $(($yesvotes + 1)) echo $yesvotes > yes_votes.tx else echo "no" fi