end of file
The point where input runs out; also, by convention, the word EOF used to end a here document.
In more detail
A program reading input stops when it reaches the end of file, which you can signal at a terminal with Control D. Bash reports syntax error: unexpected end of file when a script ends while something such as an if or a quote is still open.
Related terms
- here document — A way to write several lines of text straight into a script or file, opened with << and a marker word such as EOF and closed by that word on its own line.
- syntax error — A mistake in the form of code, such as an unclosed bracket or an if without its matching end, that the language cannot understand and so will not run.
Taught in
- Shell Variables, The Environment And export — Bash Scripting & Command Line Automation
- Script Input And Output: read, Heredocs, printf — Bash Scripting & Command Line Automation
- Debugging: set -x, bash -n And Reading The Error — Bash Scripting & Command Line Automation
- Cart Versus cart: The Data Model And What A Scrape Returns — Prometheus Certified Associate (PCA) Exam Prep