POSIX indicates that this '!' is a diagnosis that must not be printed when -s is supplied. --- ed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ed.c b/ed.c
index 96cfc3b..5369d60 100644
--- a/ed.c
+++ b/ed.c
@@ -871,7 +871,8 @@ execsh(void)
if (repl)
puts(cmd);
system(cmd);
- puts("!");
+ if (optdiag)
+ puts("!");
}
static void
--
2.1.4
