try adding a p to the end of the s///g command. This will allow the
substitution to be (p)rinted.
cat logfile | sed s/pattern*/&\n*/gp
On Fri, 25 Feb 2000, David S. Jackson wrote:
> Hi,
>
> I want to insert a newline into a stream of characters on the fly
> as I cat a logfile. Is this how to do it?
>
> cat logfile | sed s/pattern*/&\n*/g
>
> It doesn't work, so I am actually asking: How do I do this? :-)
>
> TIA!
>
> --
> David S. Jackson http://www.dsj.net
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> "Habit is either the best of servants or the worst of masters."
> --Nathaniel Emmons
> --
> To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.
>
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.