Search Results

Search: Posts Made By: faintingquiche
2,248
Posted By in2nix4life
If available on your flavor of 'nix, you can use...
If available on your flavor of 'nix, you can use the shuf command:


shuf -n 1 -i 40-70
2,248
Posted By wisecracker
comp=$(( RANDOM%31+40 ))
comp=$(( RANDOM%31+40 ))
3,865
Posted By Akshay Hegde
Correct your code like this num=1 ...
Correct your code like this

num=1
increment=1
while [ $num -le 100 ]
do
echo $num
num=$((num+1)) # OR ((num++))
done
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 01:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy