gpt4 book ai didi

linux - read -r 有什么作用?

转载 作者:太空宇宙 更新时间:2023-11-04 11:56:18 25 4
gpt4 key购买 nike

String="This is a string of words."

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

我用man read命令查看,但是根本没有选项。我还尝试搜索模式 /-r。它没有结果。我怎样才能找到 -r 的实际作用?

最佳答案

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.

关于linux - read -r 有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54232097/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com