> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bash Left Shift

The `<<` operator, known as a **Here Document** or **Heredoc**, is an I/O redirection mechanism that instructs the Bash parser to read a block of multi-line text from the current source and feed it to a command's standard input (`stdin`). The shell continues reading until it encounters a line containing only a predefined, user-specified delimiter.

```bash theme={"dark"}
command <<DELIMITER
document_body
DELIMITER
```

## Lexical Rules and Parsing Mechanics

* **Delimiter Constraints:** The terminating `DELIMITER` must appear on a line by itself. It cannot be preceded by any characters (including spaces), cannot be followed by any characters (including comments), and must match the opening identifier exactly.
* **Standard Expansion:** By default, the shell subjects the `document_body` to parameter expansion (`$VAR`), command substitution (`$(command)`), and arithmetic expansion (`$((expression))`). The backslash (`\`) acts as an escape character to prevent specific expansions.
* **Literal Evaluation (Quoted Delimiter):** If any character of the opening `DELIMITER` is quoted (using single quotes `'EOF'`, double quotes `"EOF"`, or escaping `\EOF`), the shell disables all expansions. The entire `document_body` is passed to the command as raw, literal text.

## The Tab-Stripping Modifier (`<<-`)

Appending a hyphen to the operator alters the parsing behavior to ignore leading tab characters.

```bash theme={"dark"}
command <<-DELIMITER
	document_body
	DELIMITER
```

When `<<-` is used, Bash strips all leading tab characters (`\t`)—but not spaces—from every line within the `document_body` as well as from the line containing the terminating `DELIMITER`. This mechanism exists strictly to allow the Here Document to be indented naturally within the source code without passing the indentation whitespace to the command's `stdin`.

<div
  style={{ 
display: "flex", 
justifyContent: "space-between", 
alignItems: "center", 
maxWidth: "754px", 
padding: "1rem 0",
marginBottom: "24px"
}}
>
  <span style={{ fontWeight: "bold", fontSize: "1.25rem", color: "var(--tw-prose-headings)", fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif" }}>Tired of Poor Bash Skills? Fix That With Deep Grasping!</span>

  <a
    href="https://syntblaze.com"
    target="_blank"
    style={{ 
  marginLeft: "24px",
  textDecoration: "none", 
  backgroundColor: "#007AFF",
  color: "#ffffff", 
  padding: "6px 16px", 
  borderRadius: "16px",
  fontSize: "0.9rem",
  fontWeight: "600",
  textAlign: "center",
  transition: "background-color 0.2s ease"
}}
  >
    Learn More
  </a>
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/skill-tracking.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=b9b0305c93bb501c9e767b5c76c88835" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/skill-tracking.png" />

  <img src="https://mintcdn.com/syntblazellc/23tyuOzaWS88qFlc/images/nuggets.png?fit=max&auto=format&n=23tyuOzaWS88qFlc&q=85&s=c86c80197299762989e9b882419b2109" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/nuggets.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/bite-sized-exercises.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=a65f9a38c37ff28ab73ed783c53c60e3" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/bite-sized-exercises.png" />
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap", marginTop: "12px" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/mastery-chain.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=748a1763454713e679260fbb95f154a2" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/mastery-chain.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-previews.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=242f61448ff5dd6deaaab2dccc13b507" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-previews.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-explanations.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=cf0fc1c31f9cd0fc26716781be05fbc9" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-explanations.png" />
</div>
