3 ms·
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
by u801e 5y ago
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.
- seanhunter 5y agoYes you're right of course.