[ale] SED
    Mike Fletcher 
    fletch at phydeaux.org
       
    Tue Nov 30 19:57:43 EST 1999
    
    
  
>>>>> "Les" == Les Neste <lesneste at atlnewmedia.com> writes:
    Les> 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
    Les> Does it have to be sed?  How about Perl?
    Les> cat filename | perl -w splitline.pl
    Les> where splitline.pl contains the following
    Les> while( <> ) { chomp; s/,/\n/g; print; }
        No need for a file or cat (or whitespace, for that matter :)
perl -le 'BEGIN{undef$/};$_=<>;y/\n//d;s/,/\n/g;print' filename
-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
678 443-6239(w)       |  scary questions." -- Jules                =(___)=
                      |                                               U
    
    
More information about the Ale
mailing list