1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-24 17:36:23 +02:00

case: use long options (#16413)

Update case.md
This commit is contained in:
Managor 2025-05-08 08:07:11 +03:00 committed by GitHub
parent 248c52f1ba
commit 06d6b63c56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: