Hi Antonio, > "Newline inserted" and "Newline appended" are not included in any of > the 3 categories of messages shown by ed (diagnostics, help messages, > and the byte counts and '!' prompt). Therefore they are not currently > suppressed by '-q' or '-s', nor toggled by the 'H' command. > > I think you are right that these two messages belong in the same > category as byte counts and should be suppressed by '-s'. The fix will > appear in the next version of ed. (Presumably ed-1.21 in January).
Thank you, that makes total sense! Just to reuse the thread: what about the echoed shell commands? Neither -s nor -q seems to suppress the printout of these commands. I have a # Don't repeat at home, illustrative purposes only! !rm -f % in one of my scripts (https://aartaka.me/scripts/grep.ed), and running it on "CD" results in a round of relatively useless output: $ cat grep.ed | ed -sq CD Cannot open input file rm -f CD echo CD Newline appended Useful output starts here ... We've discussed the "Newline appended" already, but, aside from this, is that the intended output? I think that -s should suppress some of these shell echoes. And -q should maybe silence the "Cannot open input file" error. Am I making sense? Best of love, -- Artyom Bologov https://aartaka.me