cdist-web/src/extra/manual/3.1.11/man7/cdist-type__block.html

56 lines
4.9 KiB
HTML
Raw Normal View History

2019-04-23 18:55:23 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>cdist-type__block(7)</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div xml:lang="en" class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="idm140361381989136"></a>cdist-type__block(7)</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Steven</span> <span class="surname">Armstrong</span></h3><code class="email">&lt;<a class="email" href="mailto:steven-cdist--@--armstrong.cc">steven-cdist--@--armstrong.cc</a>&gt;</code></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="#_name">1. NAME</a></span></dt><dt><span class="section"><a href="#_description">2. DESCRIPTION</a></span></dt><dt><span class="section"><a href="#_required_parameters">3. REQUIRED PARAMETERS</a></span></dt><dt><span class="section"><a href="#_optional_parameters">4. OPTIONAL PARAMETERS</a></span></dt><dt><span class="section"><a href="#_messages">5. MESSAGES</a></span></dt><dt><span class="section"><a href="#_examples">6. EXAMPLES</a></span></dt><dt><span class="section"><a href="#_see_also">7. SEE ALSO</a></span></dt><dt><span class="section"><a href="#_copying">8. COPYING</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_name"></a>1. NAME</h2></div></div></div><p>cdist-type__block - Manage blocks of text in files</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_description"></a>2. DESCRIPTION</h2></div></div></div><p>Manage a block of text in an existing file.
The block is identified using the prefix and suffix parameters.
Everything between prefix and suffix is considered to be a managed block
of text.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_required_parameters"></a>3. REQUIRED PARAMETERS</h2></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
text
</span></dt><dd>
the text to manage.
If text is <span class="emphasis"><em>-</em></span> (dash), take what was written to stdin as the text.
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_optional_parameters"></a>4. OPTIONAL PARAMETERS</h2></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
file
</span></dt><dd>
the file in which to manage the text block.
Defaults to object_id.
</dd><dt><span class="term">
prefix
</span></dt><dd>
the prefix to add before the text.
Defaults to #cdist:<span class="emphasis"><em>block/$</em></span>object_id
</dd><dt><span class="term">
suffix
</span></dt><dd>
the prefix to add after the text.
Defaults to #/cdist:<span class="emphasis"><em>block/$</em></span>object_id
</dd><dt><span class="term">
state
</span></dt><dd>
<span class="emphasis"><em>present</em></span> or <span class="emphasis"><em>absent</em></span>, defaults to <span class="emphasis"><em>present</em></span>
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_messages"></a>5. MESSAGES</h2></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
add
</span></dt><dd>
block was added
</dd><dt><span class="term">
update
</span></dt><dd>
block was updated/changed
</dd><dt><span class="term">
remove
</span></dt><dd>
block was removed
</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_examples"></a>6. EXAMPLES</h2></div></div></div><pre class="screen"># text from argument
__block /path/to/file \
--prefix '#start' \
--suffix '#end' \
--text 'some\nblock of\ntext'
# text from stdin
__block some-id \
--file /path/to/file \
--text - &lt;&lt; DONE
here some block
of text
DONE</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_see_also"></a>7. SEE ALSO</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
<a href="../man7/cdist-type.html">cdist-type(7)</a>
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_copying"></a>8. COPYING</h2></div></div></div><p>Copyright (C) 2013 Steven Armstrong. Free use of this software is
granted under the terms of the GNU General Public License version 3 (GPLv3).</p></div></div></body></html>