News for hackers. Stuff that matters.
Re:Actually Using Ed (2012) by u801e on Sunday February 13, 2022 @04:59AM (#30320645)
I think the second line should start with

    1,/^--/ g...
Unless forward slashes aren't required to indicate a regex based address.

One thing I do to create my ed scripts is to actually read the output of ls with some file pattern and then use a vim macro to edit the output as follows:

    ed <<EOF
    e file1
    commands
    w
    e file2
    commands
    w
    ...
    wq
    EOF
The gnu info page for ed is a very good reference to determine what commands are available and how addressing works.
Re:Actually Using Ed (2012) by seanhunter on Sunday February 13, 2022 @08:58AM (#30321790)
Yes you're right of course.