getas(command, [Options...])
command, reads its output and translate it acording the options received (using
the external PERL command any2sexp.
By default the standard output of the command is tranlated to a STR-seq
(the seq of the lines).
The external command any2sexp (that can be enriched if we want) knows about tables STR-seq-seq:
getas("ps",
['type -> "tab",
'fs -> "...fieldseparator",
'rs -> "...registerSeparator"])
As soon as you have it in camila, you can build a function to translate the values to a more suitable model if necessary.
pp(getas("ls -1",[]));
Reading date and time:
pp(getas("date +'%m %d %H %M %S'", [ 'type -> 'txt, 'rs -> " "]));
Process status:
pp(getas("ps", ['type -> 'tab]));
Which files use getas:
pp(getas("grep getas *.cam", ['type -> 'tab, 'fs -> ":"]));