Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • try while [ "$a" -lt "50" ] Also you appear to be using quotes instead of backticks. Commented Aug 2, 2016 at 14:30
  • in this a='expr $a+1' those single quotes should be backticks to start with and your while condition doesn't evaluate well either Commented Aug 2, 2016 at 14:31
  • @MelBurslan : Also, he is missing the spaces around the operator. Commented Aug 2, 2016 at 14:41
  • 1
    Just to throw it out there, I prefer using for loops in these types of situations. for a in {0..50};do echo $a;done Commented Aug 2, 2016 at 15:16