-1

I know that bash has the <, >, and 2> operators to redirect stdin, stdout, and stderr to a file, and that using >> for both out and err appends instead of flushing any available files first. but I came across this line

IFS=',' read -a myarray <<< "$mystring"

which seems to read some data from a variable. What exactly is this operator? , and is there any << operator?

Avinash Raj
  • 172,303
  • 28
  • 230
  • 274

1 Answers1

2

<<< string sends the contents of string to the command on standard input. (See §3.6.7 "Here Strings" in the Bash Reference Manual.)

<< is similar, but allows the string to be written across several lines; see §3.6.6 "Here Documents" in the Bash Reference Manual for details on how to use it.

ruakh
  • 175,680
  • 26
  • 273
  • 307