3 ms·
Many FreeBSD utilities support a --libxo flag that produces structured output, although there isn't special handling in shells yet. % ls --libxo json {
by emaste 10y ago
Many FreeBSD utilities support a --libxo flag that produces structured output, although there isn't special handling in shells yet.
% ls --libxo json
{"__version": "1", "file-information": {"directory":[{"entry": [{"name":"bar"}, {"name":"foo"}]}]}
}
% ls --libxo xml
<file-information __version="1"><directory><entry><name>bar</name></entry><entry><name>foo</name></entry></directory></file-information>