I would like if someone points out mistakes in my script. The source where I'm learning from is so buggy that's why it's confusing me.  PURPOSE OF THIS SCRIPT: It will count the numbers from whatever number the user enters to number 1#!/bin/bashecho -n Enter a numberread numberif (($number > 0))  ; thenindex = $numberwhile [ $index => 1 ]  ; doecho $index((index--))breakdonefi    ERROR IT GIVES: index: command not found
Could not execute a Bash Script if / while
bash;shell script;variable
index = $number cannot use spaces around = for variable assignment.. use index=$number or ((index = number))[ $index => 1 ] I suppose you want to check if index is greater than or equal to 1, use [ $index -ge 1 ] or ((index >= 1))why is the break statement used? it is used to quit loopalso the if statement is not requiredyou can also use read -p option to add message for userputting it all together:#!/bin/bashread -p 'Enter a number: ' numberwhile ((number >= 1)) ; do    echo $number    ((number--))done