1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 18:22:08 +02:00
tldr/pages/common/let.md
2024-12-20 23:39:37 +01:00

21 lines
419 B
Markdown

# let
> Evaluate arithmetic expressions in shell.
> Supports variables, operators, and conditional expressions.
> More information: <https://manned.org/let>.
- Evaluate a simple arithmetic expression:
`let "{{result = a + b}}"`
- Use post-increment and assignment in an expression:
`let "{{x++}}"`
- Use conditional operator in an expression:
`let "{{result = (x > 10) ? x : 0}}"`
- Display help:
`let --help`