Bash Basics - How to use read command on Linux

Published: 26 June 2017
on channel: WPJ852
231
1

read
Read one line from the standard input, (or from a file) and assign the word(s) to variable name(s).

-d delim
The first character of delim is used to terminate the input
line, rather than newline.
-p prompt
Display prompt on standard error, without a trailing newline,
before attempting to read any input. The prompt is displayed
only if input is coming from a terminal.
-r
Backslash does not act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair can not be used as a line continuation.
-s
Silent mode. If input is coming from a terminal, characters are not echoed.
-t timeout
Cause read to time out and return failure if a complete line of
input is not read within timeout seconds. This option has no
effect if read is not reading input from the terminal or a pipe.


Watch video Bash Basics - How to use read command on Linux online without registration, duration hours minute second in high quality. This video was added by user WPJ852 26 June 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 231 once and liked it 1 people.