A form or redirection used in shell scripts. The << operator is followed by a character string, and until that character string is repeated everything in the file is treated as if it was being typed in on stdin

For example:
#!/bin/sh
mail bob@domain.com << END
The mail program will act as if I 
typed this with the keyboard after 
running the command 
'mail bob@domain.com'
END

The bitwise operator in C/C++ that shifts bits to the left. Shifting the bits of an integer to the left is equivalent to multiplying by powers of 2. For example:

x << y == x * 2y

The input specified in the here document construct described by Baron_Saturday is treated as a double-quoted string: variables are expanded. So the (Bourne shell) sequence

hi=hello
echo $hi | mail `whoami`
mail `whoami` <<ZZ
$hi
ZZ

will actually give you two identical mail messages, with a body of hello.

Perl has this, too, and adds a variant that takes the input literally.

Log in or register to write something here or to contact authors.