[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] SED substution question
- Subject: [ale] SED substution question
- From: danscox at mindspring.com (Danny Cox)
- Date: 17 May 2002 13:15:59 -0400
John,
On Fri, 2002-05-17 at 11:43, John C wrote:
> I am trying to pipe a file through sed and substitute command with new
> lines.
>
> Why won't this work, and what will?
>
> cat filename | sed 's/,/\n/g'
For a 1-1 substitute like this, I prefer tr:
tr ',' '\012' <filename
--
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.
Danny
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.