News for hackers. Stuff that matters.
Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @09:46AM (#13167099)
Can you name me a single UNIX configuration file whose format is not "structured"?
Re:The Rule of Silence (2006) by TeMPOraL on Tuesday December 13, 2016 @10:27AM (#13167445)
Config files are less of a problem. The issue is with programs, which you want to use with pipes. Each has its own undocumented, arbitrary pseudo-structure with often inconsistent semantics, optimized for viewing by user.
Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @10:40AM (#13167558)
What programs are you thinking of? Maybe this is my sysadmin bias but about 90% of my UNIX tools usage is on config files...
Re:The Rule of Silence (2006) by JdeBP on Tuesday December 13, 2016 @11:08AM (#13167805)
Let me suggest an incendiary example: systemd

systemctl status wibble.service : Displays human-readable information, with colours, line drawings, and variable-length free-form text; that is exceedingly hard for a program to parse reliably.

Contrast with

systemctl show wibble.service : Outputs machine-readable information, in systemd's favourite form of a Windows INI file.

Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @11:11AM (#13167823)
Yikes. Makes me glad I run Slackware. Though I seem to recall from The Init Wars that it was precisely this quality of SystemD that made people lob the charge that it violated the "Unix philosophy"
Re:The Rule of Silence (2006) by TeMPOraL on Tuesday December 13, 2016 @02:30PM (#13169968)
ls, ps, du, df, ... pretty much all CLI tools. The kind you use in scripts.
Re:The Rule of Silence (2006) by bandrami on Tuesday December 13, 2016 @03:44PM (#13170801)
All four of which users are enjoined, over and over again, not to try to parse the output of (particularly ls). That is, those are the tools specifically not meant to be connected by pipelines, but merely used for operator convenience.
Re:The Rule of Silence (2006) by qwertyuiop924 on Tuesday December 13, 2016 @05:17PM (#13171666)
...But how do you extract that data otherwise?
Re:The Rule of Silence (2006) by bandrami on Wednesday December 14, 2016 @08:25AM (#13175743)
Instead of ls, find. Instead of ps, you parse the nodes in the /proc filesystem that ps itself parses. Ditto the /sys filesystem and du/df.
Re:The Rule of Silence (2006) by qwertyuiop924 on Wednesday December 14, 2016 @01:30PM (#13178365)
When those tools were written, /sys and /proc didn't exist.