String="This is a string of words."
read -r -a Words <<< "$String"
我使用man read
命令进行检查,但是根本没有选择。我也尝试搜索模式/-r
。它没有结果。如何找到-r
的实际用途?
答案 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.