I'm trying to get a simple while loop working in bash that uses two conditions, but after trying many different syntax from various forums, I can't stop throwing an error. Here is what I have:
while [ $stats -gt 300 ] -o [ $stats -eq 0 ]
I have also tried:
while [[ $stats -gt 300 ] || [ $stats -eq 0 ]]
... as well as several others constructs. I want this loop to continue while $stats is > 300
or if $stats = 0
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…