diff --git a/SC2202.md b/SC2202.md index dc63e6f..cab6db3 100644 --- a/SC2202.md +++ b/SC2202.md @@ -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: