A here document is a way to define a literal string preserving the space, new line characters, etc. It is used with the << redirection operator and it needs a delimiter token. Let’s see an example:
$ cat << _END >file
> This is
> a multiline
> string
> _END
$ cat file
This is
a multiline
string
I used _END as delimiter, but you can use whatever you want (endOfDocument, _EOF_, etc)
Add your comment below, or trackback from your own site.
Subscribe to these comments.
Be nice. Keep it clean. Stay on topic. No spam.
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>