Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-26 00:13:26 +00:00
parent d1f45d718c
commit e815ba73c5
38 changed files with 142 additions and 45 deletions

View File

@@ -12,9 +12,13 @@ source: https://github.com/tldr-pages/tldr.git
`select {{word}} in {{apple}} {{orange}} {{pear}} {{banana}}; do echo ${{word}}; done`
- Create a menu for picking a file or folder from the current directory:
- Create a menu from the output of another command:
`select {{file}} in *; do echo ${{file}}; done`
`select {{line}} in $({{command}}); do echo ${{line}}; done`
- Specify the prompt string for `select` and create a menu for picking a file or folder from the current directory:
`PS3="{{Select a file: }}"; select {{file}} in *; do echo ${{file}}; done`
- Create a menu from a Bash array: