fn: sgnd_dt_export_psv
Purpose
Write a table to a PSV file with the schema as its first line.
Arguments
$1— Schema.$2— Name of table array.$3— Destination file.
Side effects
Creates the parent directory if necessary and overwrites the destination file.
Returns
- 0 after writing the file; 1 on invalid schema or filesystem failure.
Usage
rows=("Ada|admin")
sgnd_dt_export_psv "name|role" rows "/tmp/people.psv"
