Your Question: What Is Here Document in Linux?

Your Question: What Is Here Document in Linux?
Contents

In Linux, here document (also commonly referred to as heredoc) refers to a special block of code that contains multi-line strings that will be redirected to a command. … The command above is doing the same thing as the previous command in a much concise form.

What is the use of here document?

A here document is a special-purpose code block. It uses a form of I/O redirection to feed a command list to an interactive program or a command, such as ftp, cat, or the ex text editor. Choose a limit string sufficiently unusual that it will not occur anywhere in the command list and confuse matters.

How do you use here in a script?

To use here document in any bash script, you have to use the symbol .

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.