What is the document here?

In relation to computers and computer programming, there is a document here a list of text used to define input to be handed over to the program using a special operator, so exceptionally long blocks of commands or text can be easily passed. "Here the document" or "HEREDOC" is rather a general term, because the exact implementation of how the document works and what it can contain will vary from one operating system, application or programming language to the next. Despite what the name suggests, the document is not usually a separate file, but instead the text block is in the script or entered or inserted directly at the end of the program command. The main use of the document comes here when programs are performed by a script or batch file from the command line, where Hyredoc provides either a list of instructions for the program for designing or entering the program for processing. Depending on many factors, the document may be a simple list of words here or it can include a comprehensive variableor UDE programming code that can decrypt the operating system or target application.

In the most basic terms, the document here is only a list of text that contains formatting characters such as cards, trolley returns, and line interruption. It is a convenient way to pass arguments to a program that is made from the command line, especially when used a set of packaging such as a script or batch file. The text contained in Hiedoc is sent to the program as if it were entered by the user exactly as it seems. This allows one Heredoc to be used again and again to provide the program the same input, so that it can repeatedly perform the same tasks without the user requires the user to actually recreate manually.

One example of how the document can be seen here can be seen using a simple sendmail command line that sends e -mail. When done, SendmailpRogram first asks the user to enter the target e -mail address; He then asks for the subject of the e -mail and finally about the text of the e -mail. If it is made from the command line, the user would respond to each prompt by entering information, hitting the return key and waiting for the reacting program. When the Heredoc is used in the packaging file, all information to be provided to Sendmail can be entered in advance, including the return button and stored in the packaging file. In this way, when the SENDMail program is done with Hedoc, the input is automatically fed into the program and the e -mail is sent without the user to require anything more.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?