-r读什么?

时间:2019-01-17 08:52:41

标签: linux

String="This is a string of words."

read -r -a Words <<< "$String"

我使用man read命令进行检查,但是根本没有选择。我也尝试搜索模式/-r。它没有结果。如何找到-r的实际用途?

1 个答案:

答案 0 :(得分:0)

read是一个内置的shell命令,您可以从man bash中找到有关它的信息:

read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
...
-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 may not be used as a line continuation.