sed command behavior suspect

Glen Brydon glen at proexam.UUCP
Thu Jul 6 07:46:55 AEST 1989


Upon installation of the Sun O/S version 4.0.3 we discovered that a sed
editing script stopped working properly. Upon diagnosis we isolated the
problem to the behavior of the `p' suffix to the Substitute command.
There seems to be some sort of interaction between this print option
and a `d' (delete) which follows in the i/o loop. (i.e.

	sed 's/.*/&/p;d'

). The bsd version does print all the lines as expected, but the system V
one does not. Also, the latest bsd version on our sun os does not either.

Please set me straight, but shouldn't this work as expected, and print
all lines?

Thanks for your comments.



More information about the Comp.unix.wizards mailing list