mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 15:49:14 +00:00
Update cheatsheets
This commit is contained in:
26
tldr/linux/let
Normal file
26
tldr/linux/let
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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`
|
||||
Reference in New Issue
Block a user