3 ms·
No one is forcing you, but Sed is part of the Posix standard. It's not the Unix way or the highway, you also have Perl and a host of other scripting languages t
by mahmud 17y ago
No one is forcing you, but Sed is part of the Posix standard. It's not the Unix way or the highway, you also have Perl and a host of other scripting languages that are better than the stock tools in Unices.
The Lisp Operating System solved this problem by having a unified I/O format (S-expressions) and built the lexer and parser in the OS. The Lisp READ and WRITE operators are overloaded methods that parse and serialize Lisp code and data structures respectively. If your configuration syntax or programming language syntax is in fully-parenthesized prefix syntax (i.e. valid Lisp s-exps) you can read and write expressions, statements and functions (the grammar of which is all in your hands btw) right there in the shell, and from within all running programs. You could even redefine builtin functions from the shell. Imagine if you could shadow the definition of, say, fopen(3), the C function for opening FILE streams. You could instrument it to log all file access, and all the programs you fire up after this will have their access to files logged. You can have the functionality of ltrace(1) with in seconds.
Ask your smart questions in google and get enlightened.
- digamber_kamat 17y agoSometimes I do find google better, atleast it comes with some relevant answers.