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.

Required fields*

6
  • 2
    The final script is wrong, as @dr01 pointed out, you need to remove the semicolon after do. Commented Mar 17, 2018 at 19:45
  • 3
    @jake, this also says you must remove the semicolon after do. In addition, this answer explains why you must remove the semicolon after `do'. Commented Mar 17, 2018 at 21:31
  • What if $i needs to be part of a file name? Does it need double quotes? Commented Nov 7, 2018 at 21:41
  • 1
    do filename_${i} then Commented Feb 10, 2020 at 15:50
  • @user4556274 according to the syntax "for i do; done" should work as well. why doesn't it? Commented Apr 17, 2020 at 6:33