diff --git a/pages/common/case.md b/pages/common/case.md index 6f8d9fd1fc..6113198d28 100644 --- a/pages/common/case.md +++ b/pages/common/case.md @@ -5,11 +5,11 @@ - Match a variable against string literals to decide which command to run: -`case {{$COUNTRULE}} in {{words}}) {{wc -w README}} ;; {{lines}}) {{wc -l README}} ;; esac` +`case {{$COUNTRULE}} in {{words}}) {{wc --words README}} ;; {{lines}}) {{wc --lines README}} ;; esac` - Combine patterns with |, use * as a fallback pattern: -`case {{$COUNTRULE}} in {{[wW]|words}}) {{wc -w README}} ;; {{[lL]|lines}}) {{wc -l README}} ;; *) {{echo "what?"}} ;; esac` +`case {{$COUNTRULE}} in {{[wW]|words}}) {{wc --words README}} ;; {{[lL]|lines}}) {{wc --lines README}} ;; *) {{echo "what?"}} ;; esac` - Allow matching multiple patterns: