Linux Index

What is a heredoc and what are the benefits of using them?

A heredoc or (here-document) is a way of quoting large amounts of texts in shells and programming languages. It preserves the line breaks and other formatting of the literal text; some implementations allow variables to be interpolated, the quoted text to be executed as commands, or leading tabs to be stripped. The general syntax is << followed by an identifier, followed, starting on the next line, by the text to be quoted, and then closed by the same identifier on its own line. Many Unix shells, including the bourne shell (sh) and zsh, have heredocs as a way of providing input to commands. PHP and Perl also have implementations of heredocs.

What are the 3 most basic commands when installing a program from source?

configure, make, make install

What do the first 5 entries of a cron job mean. * * * * * /command

<minute 0-59> <hour 0-23> <day of month 1-31> <month 1-12> <day of week 0-6 sun=0>

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.