2

Possible Duplicate:
Correct textual name for <<

I am learning about Go and saw this usage I've never seen before (from http://golang.org/doc/install.html):

$ cat >hello.go <<EOF
package main

import "fmt"

func main() {
    fmt.Printf("hello, world\n")
}
EOF

Curious, I tried it myself:

$ echo <<EOF hello
> asdf
> asdf
> EOF
hello

$ echo <<test hello
> hello
> test
hello

I am aware of redirecting standard input to read from a file instead (via < operator), but I've never seen <<, and not with this start/end delimiter business. (I know about >> for appending but this seems different) It's extremely hard to search for <<; could someone point me in the right direction?

I82Much
  • 121

0 Answers0