equal
deleted
inserted
replaced
5 <nadpis>Examples</nadpis> |
5 <nadpis>Examples</nadpis> |
6 <perex>Usage examples of Relational pipes tools</perex> |
6 <perex>Usage examples of Relational pipes tools</perex> |
7 <pořadí>40</pořadí> |
7 <pořadí>40</pořadí> |
8 |
8 |
9 <text xmlns="http://www.w3.org/1999/xhtml"> |
9 <text xmlns="http://www.w3.org/1999/xhtml"> |
|
10 |
|
11 |
|
12 <h3>relpipe-tr-validator</h3> |
|
13 |
10 <p> |
14 <p> |
11 The world is relational! |
15 Just a passthrough command, so these pipelines should produce the same hash: |
12 </p> |
16 </p> |
|
17 |
|
18 <m:pre jazyk="bash"><![CDATA[ |
|
19 relpipe-in-fstab | relpipe-tr-validator | sha512sum |
|
20 relpipe-in-fstab | sha512sum]]></m:pre> |
|
21 |
|
22 <p> |
|
23 This tool can be used for testing whether a file contains valid relational data: |
|
24 </p> |
|
25 |
|
26 <m:pre jazyk="bash"><![CDATA[ |
|
27 if relpipe-tr-validator < "some-file.rp" &> /dev/null; then |
|
28 echo "valid relational data"; |
|
29 else |
|
30 echo "garbage"; |
|
31 fi]]></m:pre> |
|
32 |
|
33 <p>or as a one-liner:</p> |
|
34 |
|
35 <m:pre jazyk="bash"><![CDATA[relpipe-tr-validator < "some-file.rp" &> /dev/null && echo "ok" || echo "error"]]></m:pre> |
|
36 |
|
37 <p> |
|
38 If an error is found, it is reported on STDERR. So just omit the <code>&</code> in order to see the error message. |
|
39 </p> |
|
40 |
13 </text> |
41 </text> |
14 |
42 |
15 </stránka> |
43 </stránka> |