1

What does the <<== in redirection mean?

sftp blah@server <<== >> test.log

What is the user trying to input to the command?

Nap
  • 8,096
  • 13
  • 74
  • 117

1 Answers1

5

This is a here document/heredoc. From the bash man page:

This type of redirection instructs the shell to read input from the current source until a line containing only word (with no trailing blanks) is seen. All of the lines read up to that point are then used as the standard input for a command.

The format of here-documents is:

<<[-]word
    here-document
delimiter

Example:

$ cat <<==
> Hello
> World
> ==

Gives:

Hello
World
Josh Jolly
  • 11,258
  • 2
  • 39
  • 55
  • Additionally an extract from the corresponding manpage. `This type of redirection instructs the shell to read input from the current source until a line containing only delimiter (with no trailing blanks) is seen. All of the lines read up to that point are then used as the standard input for a command. The format of here-documents is: <<[-]word here-document delimiter` – Marc Bredt Jan 15 '15 at 11:13