relpipe-data/examples.xml
branchv_0
changeset 176 46042297e0d6
parent 140 1d8a3f7ec393
child 180 d342de2e09a4
--- a/relpipe-data/examples.xml	Sun Dec 02 17:12:34 2018 +0100
+++ b/relpipe-data/examples.xml	Sun Dec 02 20:47:38 2018 +0100
@@ -7,9 +7,37 @@
 	<pořadí>40</pořadí>
 
 	<text xmlns="http://www.w3.org/1999/xhtml">
+		
+		
+		<h3>relpipe-tr-validator</h3>
+		
 		<p>
-			The world is relational!
+			Just a passthrough command, so these pipelines should produce the same hash:
+		</p>
+		
+		<m:pre jazyk="bash"><![CDATA[
+relpipe-in-fstab | relpipe-tr-validator | sha512sum
+relpipe-in-fstab | sha512sum]]></m:pre>
+
+		<p>
+			This tool can be used for testing whether a file contains valid relational data:
 		</p>
+		
+		<m:pre jazyk="bash"><![CDATA[
+if relpipe-tr-validator < "some-file.rp" &> /dev/null; then
+	echo "valid relational data";
+else
+	echo "garbage";
+fi]]></m:pre>
+		
+		<p>or as a one-liner:</p>
+		
+		<m:pre jazyk="bash"><![CDATA[relpipe-tr-validator < "some-file.rp" &> /dev/null && echo "ok" || echo "error"]]></m:pre>
+		
+		<p>
+			If an error is found, it is reported on STDERR. So just omit the <code>&amp;</code> in order to see the error message.
+		</p>
+		
 	</text>
 
 </stránka>