# HG changeset patch # User František Kučera # Date 1544105608 -3600 # Node ID 9ad44348e6aa0ded040ab5be06a4c0bacc2bac78 # Parent 82897ccc01ce8364b4ebb5365d2d6d3a9ba5673b small fixes diff -r 82897ccc01ce -r 9ad44348e6aa relpipe-data/examples.xml --- a/relpipe-data/examples.xml Tue Dec 04 22:43:03 2018 +0100 +++ b/relpipe-data/examples.xml Thu Dec 06 15:13:28 2018 +0100 @@ -67,7 +67,7 @@

In the first part, we prepend a single record (relpipe-in-cli) before the data coming from STDIN (cat). Then, we use relpipe-out-nullbyte to convert relational data to values separated by a null-byte. - This command processes only attribute values (relation and attribute names are skipped). + This command processes only attribute values (skips relation and attribute names). Then we used xargs to read the null-separated values and execute a Perl command for each record (pass to it a same number of arguments, as we have attributes: --max-args=7). Perl does the actual formatting: adds padding and does some little tunning (merges two attributes and replaces empty values with none).

@@ -89,7 +89,7 @@

For just mere fstab reformatting, this approach is a bit overengineering. - Wo could skip the whole relational thing and do just something like this: + We could skip the whole relational thing and do just something like this:

cat /etc/fstab | grep -v '^#' | sed -E 's/\s+/\n/g' | tr \\n \\0 | xargs -0 -n7 ... diff -r 82897ccc01ce -r 9ad44348e6aa relpipe-data/roadmap.xml --- a/relpipe-data/roadmap.xml Tue Dec 04 22:43:03 2018 +0100 +++ b/relpipe-data/roadmap.xml Thu Dec 06 15:13:28 2018 +0100 @@ -38,6 +38,7 @@ diff -r 82897ccc01ce -r 9ad44348e6aa relpipe-data/specification.xml --- a/relpipe-data/specification.xml Tue Dec 04 22:43:03 2018 +0100 +++ b/relpipe-data/specification.xml Thu Dec 06 15:13:28 2018 +0100 @@ -57,7 +57,7 @@

relpipe-in-cli

- A tool that generates a single relation. I we want more relations in a single stream, we just call this command multiple times: + A tool that generates a single relation. If we want more relations in a single stream, we just call this command multiple times:

- Is suitable for passing a single relation to xargs -0 -nX (where X is the attribute count) + Is suitable for passing a single relation to xargs --null --max-args=X (where X is the attribute count) or other command that accepts values separated by a null-byte.