author | František Kučera <franta-hg@frantovo.cz> |
Mon, 27 Jul 2020 16:17:13 +0200 | |
branch | v_0 |
changeset 307 | 3b6638149349 |
parent 244 | d4f401b5f90c |
permissions | -rw-r--r-- |
23
0d2729ed16ed
zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
1 |
<stránka |
0d2729ed16ed
zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
2 |
xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana" |
0d2729ed16ed
zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
3 |
xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"> |
0d2729ed16ed
zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents:
18
diff
changeset
|
4 |
|
244
d4f401b5f90c
examples: move each example to a separate page + add generated list of examples
František Kučera <franta-hg@frantovo.cz>
parents:
241
diff
changeset
|
5 |
<nadpis>Validating relational data</nadpis> |
d4f401b5f90c
examples: move each example to a separate page + add generated list of examples
František Kučera <franta-hg@frantovo.cz>
parents:
241
diff
changeset
|
6 |
<perex>check whether data are in the relpipe format</perex> |
d4f401b5f90c
examples: move each example to a separate page + add generated list of examples
František Kučera <franta-hg@frantovo.cz>
parents:
241
diff
changeset
|
7 |
<m:pořadí-příkladu>00500</m:pořadí-příkladu> |
4
1bb39595a51c
genrování hlavní nabídky #1
František Kučera <franta-hg@frantovo.cz>
parents:
2
diff
changeset
|
8 |
|
2
ab9099ff88fa
vkládání zápatí, jmenné prostory, saxon
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
9 |
<text xmlns="http://www.w3.org/1999/xhtml"> |
176
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
10 |
|
2
ab9099ff88fa
vkládání zápatí, jmenné prostory, saxon
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
11 |
<p> |
176
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
12 |
Just a passthrough command, so these pipelines should produce the same hash: |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
13 |
</p> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
14 |
|
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
15 |
<m:pre jazyk="bash"><![CDATA[ |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
16 |
relpipe-in-fstab | relpipe-tr-validator | sha512sum |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
17 |
relpipe-in-fstab | sha512sum]]></m:pre> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
18 |
|
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
19 |
<p> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
20 |
This tool can be used for testing whether a file contains valid relational data: |
87
25dec6931f18
Lepší odsazení, tabulátory.
František Kučera <franta-hg@frantovo.cz>
parents:
23
diff
changeset
|
21 |
</p> |
176
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
22 |
|
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
23 |
<m:pre jazyk="bash"><![CDATA[ |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
24 |
if relpipe-tr-validator < "some-file.rp" &> /dev/null; then |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
25 |
echo "valid relational data"; |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
26 |
else |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
27 |
echo "garbage"; |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
28 |
fi]]></m:pre> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
29 |
|
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
30 |
<p>or as a one-liner:</p> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
31 |
|
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
32 |
<m:pre jazyk="bash"><![CDATA[relpipe-tr-validator < "some-file.rp" &> /dev/null && echo "ok" || echo "error"]]></m:pre> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
33 |
|
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
34 |
<p> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
35 |
If an error is found, it is reported on STDERR. So just omit the <code>&</code> in order to see the error message. |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
36 |
</p> |
46042297e0d6
relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents:
140
diff
changeset
|
37 |
|
87
25dec6931f18
Lepší odsazení, tabulátory.
František Kučera <franta-hg@frantovo.cz>
parents:
23
diff
changeset
|
38 |
</text> |
4
1bb39595a51c
genrování hlavní nabídky #1
František Kučera <franta-hg@frantovo.cz>
parents:
2
diff
changeset
|
39 |
|
1 | 40 |
</stránka> |