Update cheatsheets

This commit is contained in:
ivuorinen
2025-01-31 00:17:15 +00:00
parent 33856d1350
commit 2a6f4078bf
2 changed files with 29 additions and 0 deletions

8
tldr/$
View File

@@ -27,3 +27,11 @@ source: https://github.com/tldr-pages/tldr.git
- Expand with the output of `command` and run it. Same as enclosing `command` in backtics:
`$({{command}})`
- List how many arguments the current context has:
`echo $#`
- Print out a Bash array:
`echo ${array[@]}`

21
tldr/linux/dialog Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# dialog
> Display dialog boxes on the terminal.
> More information: <https://manned.org/dialog>.
- Display a message:
`dialog --msgbox "{{Message}}" {{height}} {{width}}`
- Prompt the user for text:
`dialog --inputbox "{{Enter text:}}" {{8}} {{40}} 2>{{output.txt}}`
- Prompt the user for a yes/no question:
`dialog --yesno "{{Continue?}}" {{7}} {{40}}`