[comp.sys.hp] ed

kriso@lombard.dartmouth.edu (Kris Olander) (02/20/91)

The following script snipit will fail to do what
it's suppose to do -- ie: delete the first line of
/tmp/file.x.

------------------------------------------------
ed /tmp/file.x << stop > /dev/null
1d
w
q
stop
-------------------------------------------------

If you don't redirect the output to /dev/null,
you'll see two or three '?' which seems to indicate
that ed(1) isn't happy with the input.

This code was in a Makefile so it was running
under sh, however, we verified that it doesn't
matter whether this is done in sh or csh.

We've worked around this by using sed(1) instead.


-- 
Kris Olander
--------------kris.olander@dartmouth.edu----------------
"My thought, my whole thoughts, and nothing but my thoughts,
  so help me God",  -- My stdclaimer