mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
less-than: add examples (#15639)
This commit is contained in:
parent
c0df7e9877
commit
2cacaaa4e7
1 changed files with 12 additions and 0 deletions
|
@ -14,3 +14,15 @@
|
|||
- 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}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue