Follow

The power that sed unlock when you understand how to use the hold space is unbelievable.

Beyond an actual use case that I had to handle with it because of lack of alternatives on the target system (not even vi or awk were available, and I was not allowed to transfer the data outside), what opened my eyes have been the sed manual¹: other texts where technically complete but somehow didn't clicked.

Now I wonder why nobody have built a graphical sed debugger that shows you the pattern space, the hold space and the program so that you can step into it and see what happens.

I now have a good mental model of its inner working, but to teach it to kids (as we should) we need something like that.

Also I wonder if we should build a less succint sed language: the one letter commands are effectively an pretty good machine code for a sed machine AND they let you write powerful one-liners that fit well in a script but they are pretty hard for kids to learn.
____
¹ gnu.org/software/sed/manual/se

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.