Updated SC2051 (markdown)

Peter Urda
2015-12-23 03:28:31 -05:00
parent 9f3b8669a9
commit 383f13e0d8

@@ -2,17 +2,21 @@
### Problematic code: ### Problematic code:
```bash
for i in {1..$n} for i in {1..$n}
do do
echo "$i" echo "$i"
done done
```
### Correct code: ### Correct code:
```bash
for ((i=0; i<n; i++)) for ((i=0; i<n; i++))
do do
echo "$i" echo "$i"
done done
```
### Rationale: ### Rationale:
@@ -34,4 +38,4 @@ done < <(eval "printf '%s\0' $(printf "{%q..%q}.jpg" "$from" "$to")")
### Exceptions ### Exceptions
None (if you're writing for e.g. zsh, make sure the shebang indicates this so shellcheck won't warn) None (if you're writing for e.g. zsh, make sure the shebang indicates this so shellcheck won't warn)