How to create documents with Bash scripts
Bash “here documents” are a useful way to create uncomplicated YAML and HTML documents, inventory files, and emails.
Jose Vicente Nunez
Tue, 9/14/2021 at 4:57pm
Photo by Sora Shimazaki from Pexels
Sometimes you need to generate multi-line documents with complex nested structures, like YAML or HTML, from inside Bash scripts. You can accomplish this by using some special Bash features, like here documents. A “here doc” is a code or text block that can be redirected to a script or interactive program. Essentially, a Bash script becomes a here doc when it redirects to another command, script, or interactive program.
This article explains how to:
Command line utilities
Read More at Enable Sysadmin