A here document (also called a here-document, a heredoc, a here-string or a here-script) is a way of specifying a string literal in command line shells such as Bash, Windows PowerShell and the Bourne Shell, as well as programming languages such as Perl, PHP, Python and Ruby. It preserves the line breaks and other whitespace (including indentation) in the text. Some languages allow variable interpolation or even code to be evaluated inside of the string.

PropertyValue
dbpprop:abstract
  • A here document (also called a here-document, a heredoc, a here-string or a here-script) is a way of specifying a string literal in command line shells such as Bash, Windows PowerShell and the Bourne Shell, as well as programming languages such as Perl, PHP, Python and Ruby. It preserves the line breaks and other whitespace (including indentation) in the text. Some languages allow variable interpolation or even code to be evaluated inside of the string. The general syntax is << followed by a delimiting 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 here documents as a way of providing input to commands.
  • Ein Heredoc (auch here document genannt), ist ein Sprachkonzept aus der Informatik zur Spezifikation eines Zeichenfolgenliterals in Kommandozeileninterpretern wie beispielsweise der bash, Windows PowerShell und der Bourne-Shell sowie in Programmiersprachen wie etwa Perl, PHP, Python und Ruby. Wie der Name schon sagt (here document = Hier Dokument/Text), lassen sich damit Textabschnitte definieren. Die Besonderheit besteht darin, dass etwaig enthaltene Zeilenumbrüche und andere Leerzeichen (einschließlich Einzüge) im Text bewahrt werden. Einige Sprachen ermöglichen auch die Interpolation von Variablen oder auch Programmcode innerhalb der Zeichenfolge. Meist werden Heredocs durch <<,gefolgt von einem frei wählbaren Delimiter-Bezeichner (Trennzeichen), eingeleitet. Ab der nächsten Zeile folgt der eigentliche Text. Das Ende des Heredoc schließlich markiert eine Zeile, die nur den in der einleitenden Zeile verwendeten Bezeichner und ggf. ein abschließendes Semikolon beinhaltet (Beispiele siehe unten). Viele UNIX-Shells, einschließlich der Bourne-Shell (sh) und zsh, bieten Heredocs als eine Möglichkeit, um Eingabewerte für Kommandozeilenbefehle anzugeben. Ein Beispiel in PHP wäre: Dies ist ein Heredoc zweite Zeile BEREICH;
  • Heredoc (conjunción apocópica de Here-document o Documento-aquí en español) es una forma de representar cadenas en los lenguajes de programación o shells de algún Sistema Operativo basado en Unix. Los lenguajes de programación que más se valen de este son PHP y Ruby. La diferencia entre Heredoc y otras formas más tradicionales de mandar cadenas de caracteres a la salida estándar es que con heredoc se pueden transmitir grandes cadenas de texto con poco esfuerzo; mientras que con instrucciones simples como printf de C y echo de PHP hay que mandar el texto línea por línea (con un formato a veces complejo en C), incluyendo comillas, especificaciones, punto y coma, el nombre de la instrucción y a veces especificaciones, por cada línea o fragmento de ella que se desee publicar, heredoc nos da la oportunidad de mostrar extensiones mayúsculas de párrafos con una sola instrucción o un solo procedimiento. El texto (generalmente párrafos) creados con instrucciones heredoc incluyen y respetan la indentación, los espacios y caracteres de nueva línea del texto y otros atributos difíciles de incluir con texto simple, como las comillas dobles. Generalmente la sintaxis para programar una salida con heredoc es usando alguna instrucción seguida de <<, después un identificador para el texto, siguiendo con una línea nueva y el texto mismo y, finalmente, el cierre de la instrucción.
dbpprop:hasPhotoCollection
dbpprop:reference
rdf:type
rdfs:comment
  • A here document (also called a here-document, a heredoc, a here-string or a here-script) is a way of specifying a string literal in command line shells such as Bash, Windows PowerShell and the Bourne Shell, as well as programming languages such as Perl, PHP, Python and Ruby. It preserves the line breaks and other whitespace (including indentation) in the text. Some languages allow variable interpolation or even code to be evaluated inside of the string.
  • Ein Heredoc (auch here document genannt), ist ein Sprachkonzept aus der Informatik zur Spezifikation eines Zeichenfolgenliterals in Kommandozeileninterpretern wie beispielsweise der bash, Windows PowerShell und der Bourne-Shell sowie in Programmiersprachen wie etwa Perl, PHP, Python und Ruby. Wie der Name schon sagt (here document = Hier Dokument/Text), lassen sich damit Textabschnitte definieren.
  • Heredoc (conjunción apocópica de Here-document o Documento-aquí en español) es una forma de representar cadenas en los lenguajes de programación o shells de algún Sistema Operativo basado en Unix. Los lenguajes de programación que más se valen de este son PHP y Ruby.
rdfs:label
  • Here document
  • Heredoc
  • Here document
owl:sameAs
skos:subject
foaf:page
is dbpprop:disambiguates of
is dbpprop:redirect of
is owl:sameAs of