sed command to replace newlines with spaces

From: Antonio Vázquez (avazquez_at_gmail.com)
Date: 12/23/04

  • Next message: Ross Alexander: "Re: sed command to replace newlines with spaces"
    Date:         Thu, 23 Dec 2004 18:24:53 -0300
    To: aix-l@Princeton.EDU
    
    

    Hi there!

    Anyone knows how to use sed to replace newlines with spaces?

    Example:

    Before sed:
    1
    2
    3

    After sed:
    1 2 3

    I tried with
    sed 's/\n/ /g' input_file
    but it didnt work...

    Thanks in advance,

      -- Tony


  • Next message: Ross Alexander: "Re: sed command to replace newlines with spaces"