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.
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:
The gnu info page for ed is a very good reference to determine what commands are available and how addressing works.