Using printf or echo -n . Also, try using start=$(($start + 1)) or start=$[$start + 1] instead of back ticks to increase this variable.
#!/bin/bash echo "enter start and stop numbers" read start stop while [ $start -lt $stop ] do printf "%d " $start start=$(($start + 1)) done
#!/bin/bash echo "enter start and stop numbers" read start stop while [ $start -lt $stop ] do echo -n "$start "
source share