Timeline for Problem when trying a simple loop in bash
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 2, 2016 at 21:04 | history | edited | Kusalananda♦ | CC BY-SA 3.0 | added 2 characters in body |
| Aug 2, 2016 at 21:02 | vote | accept | asaf92 | ||
| Aug 2, 2016 at 16:37 | history | edited | Kusalananda♦ | CC BY-SA 3.0 | added 136 characters in body |
| Aug 2, 2016 at 16:10 | comment | added | Stéphane Chazelas | From empirical tests, it looks like shellsheck only gives a warning about unquoted expansions if it can't determine that the expansion will not contain glob characters or space or tab or newline characters (regardless of what it knows $IFS to be!). | |
| Aug 2, 2016 at 16:08 | comment | added | Kusalananda♦ | @StéphaneChazelas "Strangely", yes indeed. Thanks yet again. | |
| Aug 2, 2016 at 15:59 | history | edited | Kusalananda♦ | CC BY-SA 3.0 | added 4 characters in body |
| Aug 2, 2016 at 15:54 | comment | added | Stéphane Chazelas | Your last example is actually zsh or pdksh syntax. In ksh93 or bash (or recent versions of mksh), you need to quote the arithmetic expansions (which undergo split+glob as POSIX foolishly requires). Basically, that code would start behaving strangely the day it's run in a context where $IFS contains decimal digits. | |
| Aug 2, 2016 at 15:10 | history | edited | Kusalananda♦ | CC BY-SA 3.0 | added 47 characters in body |
| Aug 2, 2016 at 14:45 | history | answered | Kusalananda♦ | CC BY-SA 3.0 |