Updated SC2202 (markdown)

koalaman
2016-12-31 13:37:39 -08:00
parent 5d471fa43b
commit cd3beb0e8d

@@ -22,9 +22,9 @@ done
Globs in `[ ]` will expand to a sequence of words, one per matching filename. Meanwhile, operators work on single words.
The problematic code is equivalent to `[ current.log -nt backup/file1.log backup/file2.log backup/file3.log ]`, which is invalid syntax.
The problematic code is equivalent to `[ current.log -nt backup/file1.log backup/file2.log backup/file3.log ]`, which is invalid syntax. A typical error message is `bash: [: too many arguments` or `dash: somefile: unexpected operator`.
Instead, you can iterate over the filenames you want with a loop, and apply your condition to each filename.
Instead, use a `for` loop to iterate over matching filenames, and apply your condition to each.
### Exceptions: