mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-06 02:56:02 +00:00
Move pages under tldr, lint run.sh, update docs
This commit is contained in:
21
tldr/read
Normal file
21
tldr/read
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# read
|
||||
|
||||
> Shell builtin for retrieving data from `stdin`.
|
||||
> More information: <https://manned.org/read.1p>.
|
||||
|
||||
- Store data that you type from the keyboard:
|
||||
|
||||
`read {{variable}}`
|
||||
|
||||
- Do not let backslash (\) act as an escape character:
|
||||
|
||||
`read -r {{variable}}`
|
||||
|
||||
- Read `stdin` and perform an action on every line:
|
||||
|
||||
`while read line; do echo "$line"; done`
|
||||
Reference in New Issue
Block a user