Update cheatsheets

This commit is contained in:
ivuorinen
2025-02-10 00:18:10 +00:00
parent 23dbe1558c
commit 5dffd8f775
10 changed files with 106 additions and 42 deletions

View File

@@ -19,3 +19,15 @@ source: https://github.com/tldr-pages/tldr.git
- Create a here string and pass that into `stdin` (achieves the same effect as `echo string |`):
`{{command}} <<< {{string}}`
- Process data from a file and write the output to another file:
`{{command}} < {{path/to/file.txt}} > {{path/to/file2.txt}}`
- Write a here document into a file:
`cat << {{EOF}} > {{path/to/file.txt}} <Enter> {{multiline_data}} <Enter> {{EOF}}`
- Disregard leading tabs (good for scripts with indentation but does not work for spaces):
`cat <<- {{EOF}} > {{path/to/file.txt}} <Enter> {{multiline_data}} <Enter> {{EOF}}`