Viewing this in the browser window can scare anybody. That's
why noone so far read whole links in prev. post. But let's
put away the fact, that open source browser doesn't support
syntax highlighting of the most basic thing -- shell
language and UNIX tools, available for 20-30 years.

,--
| http://kerneltrap.org/Linux/Decoding_Oops
`--

Here is the main point of the kernel developmnet:
understanding, knowledge, ways of debugging. Starting point
is assembly.

Text-processing assembly language is sed. Userspace assembly
is shell (mainly POSIX, but not ksh or bash). Both are in
very-very upsetting state.

Looking on 1024 bytes of this one, it is clear how syntax
highlighting is important in understanding and developing of
BRE+sed+shell tools.

So, what is the progress?

First, shell language is very complicated in terms of
parsing. I don't know if any academia compliler theory
professors have actually looked at this one. Kenneth
Almquist, who wrote ash, was from EDU domain, but he have done a
practical implementation.

Recursive nesting of subshells in ``,$(), quoting are main
features. Even using
them is not such trivial thing at all. But i saw trivial
scripting isn't that easy for some kernel developers(script
in 47128D76.5050407@garzik.org).

So, with this one it is even possible to use script
interactively and/or
in the pipe chain to mail stdout directly, as addition to
better, i.e.
efficient, usage of the system and the kernel...

Second. While trying to implement highlighting i've
discovered, that
kernel doesn't apply background attribute to the tab symbol.
I.e. tabs are always black, no matter what background color
is there. This led me to more deep understanding of the tty
processing, mainly tabstops (theory can be found in UNIX
Power Tools).

Problem can be solved by converting tabs to spaces. But
knowing, what tabstops are, it's not such trivial thing to
do. In clean-whitespace.sh i've used `expand` UNIX tool. Now
i wanted to do it in sed.

Andreas Schwab is making very interesting, mostly one-line
comments in LKML (i even checked old archives of 90s). Once
he pointed out, that i wrongly explained "\{\}" BRE
construction. While i knew what it means, i really didn't
used them at all. But after that occasion i sat down and did
read+exercise. This helped me to do my version of `expand`.

Funny, that this[0] turned to be even more efficient, that one
from recognised sed guru Greg Ubben[1].