William Ballard wrote:
> What semantically huge iceberg of a use case am I missing that makes 
> "sed -n" useful?

Try this:

  sed -n '/PATH/p' /etc/profile

Compare that to the version without -n.  There are many times where I
don't want the default action to be print.  If I were to think of it a
little more I could come up with real examples of using it.

  sed -n '/^+/q;p' /etc/passwd
  sed -n '/^+/,$p' /etc/passwd

[NIS/YP uses a line with a '+' to denote pulling in the mapfile right
there in the middle of the file.]

Bob

Attachment: pgpTxQzzDwa2Q.pgp
Description: PGP signature

Reply via email to