1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 13:42:07 +02:00
tldr/pages/common/read.md
4G3NT 274330d3b4
read: update page (#10448)
* read: update page

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-07-07 08:56:30 +05:30

352 B

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