Here Docs

In this lesson, we will cover 'here docs' and 'here strings', and when to use them.

Note: In this lesson, leading spaces are tabs. We have covered this in a previous lesson, but as a reminder: to get a tab character in your shell, type \C-v, and then hit the TAB button.

How Important is this Lesson?

Here documents, once learned, are used frequently in bash scripts or on the command line. It’s a piece of knowledge that separates the experienced user from the junior.

Basic Here Docs

Type this in to see the basic form of the here doc:

Get hands-on with 1200+ tech skills courses.