|
|
|
|
|
by slightwinder
1320 days ago
|
|
It doesn't even need a new release. jc can already fail because of details like the system-language. With my local language, on a simple output of ls -l, it's parsing {"filename":"drwxr-xr-x 16 root root 4096 Oct 4 11:21 ."}
instead of {"filename":".","flags":"drwxr-xr-x","links":16,"owner":"root","group":"root","size":4096,"date":"Oct 4 11:21"}
with LANG=US. This makes it really hard to trust such a tool. |
|
It's not unheard of for tools to require `C` locale for proper parsing:
This is one of many inherent issues with using unstructured text as an API. That's why I believe there should be a JSON (or at least some other widely used format[1]) option for tools that have output that would be useful in scripts.[0] https://github.com/kellyjonbrazil/jc#locale
[1] formats should have good library support across many languages and nice filter/query capabilities from the command-line