We read
'(1,$)g /RE/COMMAND-LIST'
Global command. Applies COMMAND-LIST to each of the addressed
lines matching a regular expression RE. The current address is set
to the line currently matched before COMMAND-LIST is executed. At
the end of the 'g' command, the current address is set to the last
line affected by COMMAND-LIST.
At least the first command of COMMAND-LIST must appear on the same
line as the 'g' command. All lines of a multi-line COMMAND-LIST
except the last line must be terminated with a backslash ('\').
Any commands are allowed, except for 'g', 'G', 'v', and 'V'. By
default, a newline alone in COMMAND-LIST is equivalent to a 'p'
command. If 'ed' is invoked with the command-line option '-G',
then a newline in COMMAND-LIST is equivalent to a '.+1p' command.
Alas
$ ed Ready.couches.html
215152
1,$/大溪/d
?
h
Invalid address
,/大溪/d
?
h
Invalid address
1,$g /大溪/d
?
h
Invalid pattern delimiter
1,$ g /44/d
?
h
Invalid pattern delimiter
q
GNU Ed 1.10
Copyright (C) 1994 Andrew L. Moore.
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
_______________________________________________
bug-ed mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ed