Artyom and all, I think a flag akin to the -f flag on AWK would be better. (edscript could possibly alias "ed -f" in that example.) I could also envision using GNU ed's comment handling on '#' to enable shebangs in script files, though I admit it would not be portable.
Alexander On Sat, Sep 28, 2024 at 4:03 PM Artyom Bologov <m...@aartaka.me> wrote: > Hi y'all, > > I'm using ed for scripting text modification lately. And what often bugs > me is that scripting is so inconvenient with ed. To edit a file with a > script taken from another file, one has to do > > ed input.txt < script.txt > > which is unintuitive, I believe. What if it was this? > > edscript script.txt input.txt > > I find this more logical—we run ed script upon the file. > > I realize that ed is a forever stable project and some additional > features are likely not the focus, but I couldn't just ignore this > use-case biting me lately. > > Best of luck, > -- > Artyom Bologov > https://aartaka.me > >