Results 1 to 2 of 2
hello i am trying to write a program where it counts up to 5 in bash and if the number gets higher then 5 then echo on screen number is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-12-2004 #1Just Joined!
- Join Date
- May 2004
- Posts
- 1
questions
hello i am trying to write a program where it counts up to 5 in bash and if the number gets higher then 5 then echo on screen number is to high
Thankx bye
- 05-12-2004 #2Linux Newbie
- Join Date
- Apr 2004
- Location
- Stockholm, Sweden
- Posts
- 130
Was that a question????
#!/bin/bash
for number in $(seq 0 6)
do
if [ $number -lt 6 ]
then
echo $number
else
echo "Number is too high"
fi
done


Reply With Quote
