mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 17:36:23 +02:00
parent
248c52f1ba
commit
06d6b63c56
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue