bash-guide icon indicating copy to clipboard operation
bash-guide copied to clipboard

first for loop example does not work

Open rblath opened this issue 8 years ago • 0 comments

First of all, thanks for the amazing bash summary! I think I found a problem with the first for loop example. It is not working as intended:

for x := 1 to 10 do begin statements end

Testing on Ubuntu 16.04 and cygwin results in this error: -bash: syntax error near unexpected token `:='

A logical replacement would be:

for x in {1..10} do echo $x done

rblath avatar Apr 06 '17 09:04 rblath