I created this script and I want to print the outputs on one line, how do I do this?
This is my script
#!/bin/bash
echo "enter start and stop numbers"
read start stop
while [ $start -lt $stop ]
do
echo $start
start=`expr $start + 1`
done
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using
printforecho -n. Also, try to usestart=$(($start + 1))orstart=$[$start + 1]instead of back ticks to increment the variable.