to upper-case) using a here document. This could be in a shell file, or entered interactively at a prompt. $ LANG=C tr a-z A-Z << END > one two three > four five six > END ONE TWO THREE FOUR FIVE SIX END was used as the delimiting identifier. It specified the start and end of the here document. The redirect and the delimiting identifier do not need to be separated by a space: <<END or << END both work equally well. By default, behavior is largely identical to the contents of double quotes: variable names are replaced by their values, commands within backticks are evaluated, etc. $ cat << EOF > \$ Working dir "$PWD" `pwd` > EOF $ Working dir "/home/user" /home/user This can be disabled by quoting any part of the label, which is then ended by the unquoted value; the behavior is essentially identical to that if the contents were enclosed in single quotes. Thus for example by setting it in single quotes: $ cat << 'EOF' > \$ Working dir "$PWD" `pwd` > EOF \$ Working dir "$PWD" `pwd` Double quotes may also be used, but this is subject to confusion, because expansion does occur in a double-quoted string, but does not occur in a here document with double-quoted delimiter. Single- and double-quoted delimiters are distinguished in some other languages, notably Perl (see below), where behavior parallels the corresponding string quoting. In POSIX shell but not csh/tcsh, appending a minus sign to the << (i.e. <<-) has the effect that leading tabs are ignored. This allows indenting here documents in shell scripts (primarily for alignment with existing indentation) without changing their value: A script containing: LANG=C tr a-z A-Z <<- END_TEXT Here doc with <<- A single space character (i.e. 0x20 ) is at the beginning of this line This line begins with a single TAB character i.e 0x09 as does the next line END_TEXT echo The intended end was before this line echo and these were not processed by tr echo +++++++++++++++ LANG=C tr a-z A-Z << END_TEXT Here doc with << A single space character (i.e. 0x20 ) is at the beginning of this line This line begins with a single TAB character i.e 0x09 as does the next line END_TEXT echo The intended end was before this line, echo but because the line with the delimiting Identifier began with a TAB it