Skip to main content
added 178 characters in body
Source Link
devnull
  • 10.8k
  • 2
  • 43
  • 50

< is used to redirect input. Saying

command < file

executes command with file as input.

The << syntax is referred to as a here document. The string following << is a delimiter indicating the start and end of the here document.

$ cat abc.txt
cat: abc.txt: No such file or directory
$ cat << abc.txt
> Hello!
> Hey :)
> abc.txt
Hello!
Hey :)
$

<< doesn't indicate any sort of indirection.


You might also want to refer to redirection and here document.

< is used to redirect input. Saying

command < file

executes command with file as input.

The << syntax is referred to as a here document. The string following << is a delimiter indicating the start and end of the here document.

$ cat abc.txt
cat: abc.txt: No such file or directory
$ cat << abc.txt
> Hello!
> Hey :)
> abc.txt
Hello!
Hey :)
$

<< doesn't indicate any sort of indirection.

< is used to redirect input. Saying

command < file

executes command with file as input.

The << syntax is referred to as a here document. The string following << is a delimiter indicating the start and end of the here document.

$ cat abc.txt
cat: abc.txt: No such file or directory
$ cat << abc.txt
> Hello!
> Hey :)
> abc.txt
Hello!
Hey :)
$

<< doesn't indicate any sort of indirection.


You might also want to refer to redirection and here document.

added 4 characters in body
Source Link
devnull
  • 10.8k
  • 2
  • 43
  • 50

< is used to redirect input. Saying

command < file

executes command with file as input.

The << syntax is referred to as a here document:. The string following << is a delimiter indicating the start and end of the here document.

$ cat abc.txt
cat: abc.txt: No such file or directory
$ cat << abc.txt
> Hello!
> Hey :)
> abc.txt
Hello!
Hey :)
$

Note that abc.txt<< in the here-doc example above isn't a filename, it's simply a delimiter; it doesn't indicate any sort of indirection.

< is used to redirect input. Saying

command < file

executes command with file as input.

The << syntax is referred to as a here document:

$ cat << abc.txt
> Hello!
> Hey :)
> abc.txt
Hello!
Hey :)
$

Note that abc.txt in the here-doc example above isn't a filename, it's simply a delimiter; it doesn't indicate any sort of indirection.

< is used to redirect input. Saying

command < file

executes command with file as input.

The << syntax is referred to as a here document. The string following << is a delimiter indicating the start and end of the here document.

$ cat abc.txt
cat: abc.txt: No such file or directory
$ cat << abc.txt
> Hello!
> Hey :)
> abc.txt
Hello!
Hey :)
$

<< doesn't indicate any sort of indirection.

Source Link
devnull
  • 10.8k
  • 2
  • 43
  • 50

< is used to redirect input. Saying

command < file

executes command with file as input.

The << syntax is referred to as a here document:

$ cat << abc.txt
> Hello!
> Hey :)
> abc.txt
Hello!
Hey :)
$

Note that abc.txt in the here-doc example above isn't a filename, it's simply a delimiter; it doesn't indicate any sort of indirection.