Advanced

How to create documents with Bash scripts

Posted by Scott_Ruecker on
Enable Sysadmin; By Jose Vicente Nunez
Mail this story
Print this story

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.

Full Story

  Nav
» Read more about: Story Type: News Story; Groups: Linux

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

This topic does not have any threads posted yet!

You cannot post until you login.