The number of CLI arguments is limited and they are passed at once to the process.
So there is option to pass the values from STDIN instead of CLI arguments.
Values on STDIN are expected to be separated by the null-byte.
We can generate such data e.g. using echo and tr (or using printf or other commands):
echo -e "1\nHello\ntrue\n2\nWorld\nfalse" \
| tr \\n \\0 \
| relpipe-in-cli generate-from-stdin relation_from_stdin 3 \
a integer \
b string \
c boolean \
| relpipe-out-tabular
The output is same as above. We can use this approach to convert various formats to relational data. There are lot of data already in the form of null-separated values e.g. the process arguments:
cat /proc/$(pidof mc)/cmdline \
| relpipe-in-cli generate-from-stdin mc_args 1 a string \
| relpipe-out-tabular
If we have mc /etc/ /tmp/ running in some other terminal, the output will be:
mc_args: ╭────────────╮ │ a (string) │ ├────────────┤ │ mc │ │ /etc/ │ │ /tmp/ │ ╰────────────╯ Record count: 3
Also the find command can produce data separated by the null-byte:
find /etc/ -name '*ssh*_*' -print0 \
| relpipe-in-cli generate-from-stdin files 1 file_name string \
| relpipe-out-tabular
Will display something like this:
files: ╭───────────────────────────────────╮ │ file_name (string) │ ├───────────────────────────────────┤ │ /etc/ssh/ssh_host_ecdsa_key │ │ /etc/ssh/sshd_config │ │ /etc/ssh/ssh_host_ed25519_key.pub │ │ /etc/ssh/ssh_host_ecdsa_key.pub │ │ /etc/ssh/ssh_host_rsa_key │ │ /etc/ssh/ssh_config │ │ /etc/ssh/ssh_host_ed25519_key │ │ /etc/ssh/ssh_import_id │ │ /etc/ssh/ssh_host_rsa_key.pub │ ╰───────────────────────────────────╯ Record count: 9
Relational pipes, open standard and free software (C) 2018-2026 GlobalCode | Human created – for humans only.