

Show HN: @, a self modifying shell script/swiss army knife - irrationalidiom
https://github.com/lmartinking/monkey-tail

======
fexl
Clever concept, and it really shows off a lot of shell techniques in one
place. The self-modifying aspect is fun to study (e.g. external-add,
ext_insert), and the meta functions are interesting too (e.g. require). I may
find this useful sometime, and in the meantime it makes me smile.

In my own small way, I too have used self-modify shell scripts, though nothing
as far-reaching as what you've done. When I write C code, I use a "build"
script instead of "make":

<https://github.com/chkoreff/Fexl/blob/master/src/build>

(Never mind Fexl itself, I'm just sharing the build script here.)

The build script analyzes all the .c files in the current directory and
automatically creates another "build" script in the ../obj directory. It then
runs ../obj/build. But the next time you run it, it sees that ../obj/build
already exists, so it doesn't need to analyze the .c files again.

Again, it's nothing quite like what you've done, but it just illustrates how
fun and useful self-modifying shell scripts can be.

