-1
我知道bash有<,>和2>操作符将stdin,stdout和stderr重定向到一个文件,并且使用>>代替out和err来代替首先冲洗任何可用的文件。 但我碰到这条线这是什么算子<<< bash
IFS=',' read -a myarray <<< "$mystring"
这似乎从变量读取一些数据。这个操作员到底是什么? ,并有任何< <运营商?
我知道bash有<,>和2>操作符将stdin,stdout和stderr重定向到一个文件,并且使用>>代替out和err来代替首先冲洗任何可用的文件。 但我碰到这条线这是什么算子<<< bash
IFS=',' read -a myarray <<< "$mystring"
这似乎从变量读取一些数据。这个操作员到底是什么? ,并有任何< <运营商?
<<< string
将string
的内容发送到标准输入的命令。 (请参阅§3.6.7 "Here Strings" in the Bash Reference Manual。)
<<
与此类似,但允许将字符串写入多行;有关如何使用它的详细信息,请参阅§3.6.6 "Here Documents" in the Bash Reference Manual。
http://www.gnu.org/software/bash/manual/bashref.html#Here-Strings –
'<<'是'here-docs'的运算符。 http://www.gnu.org/software/bash/manual/bashref.html#Here-Documents – Barmar