[ale] SED

Les Neste lesneste at atlnewmedia.com
Tue Nov 30 17:16:55 EST 1999


At 04:30 PM 11/30/99 -0500, Thorsten Hofrichter wrote:
>HAve a sed question. 
>I have been trying to figure this out for a few minutes now
>how do I substitute a character for a new line
>example a file that contains a,b,c,d
>I need it to output 
>a
>b
>c
>d

Does it have to be sed?  How about Perl?

cat filename | perl -w splitline.pl 

where splitline.pl contains the following

while( <> ) {
	chomp;
	s/,/\n/g;
	print;
	}

best of luck.



......................................................................

Les Neste
Voice 404-350-3345
Web http://www.mindspring.com/~lesneste






More information about the Ale mailing list