From owner-freebsd-questions@FreeBSD.ORG Tue Sep 1 18:57:57 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0BB1065670 for ; Tue, 1 Sep 2009 18:57:57 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4408FC19 for ; Tue, 1 Sep 2009 18:57:56 +0000 (UTC) Received: by bwz2 with SMTP id 2so222912bwz.43 for ; Tue, 01 Sep 2009 11:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=8HvOytzC0K/OiGmiTylXYasoRqYaawA9IYh0puWiETY=; b=gzTf8jZ091GPiM/3JOdinUnx6uSHeMRaIe9ZDCoegladgyPBpIfZlTzcnfFgYQ3piV VFc6DvIkEau8hjW/guv6jBMMZIWZLsh7ydBapA/2l5NwEkNqKejxyxxjq5YTJtIl3uut RmSqDhgnouQO0OPThGfNHJubSNOwG/7hsFR3A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=J6zQMdQayqaXKX4BECZ1dWJ978kJm6kOT1lkl/eBID8JvPTLX/mvyvp0nL01DzFBIJ W5BacRLVAP3CLhLz+40f6C9LxhAWpD/JjpnkXZmVWGotZdIk8BJAoK+D/j+GpZssbYJ7 eDMfBjxsr8jYcAJmI2e2C4TIG6gXpyZADVIJI= MIME-Version: 1.0 Received: by 10.239.130.150 with SMTP id 22mr610279hbj.59.1251831475622; Tue, 01 Sep 2009 11:57:55 -0700 (PDT) Date: Tue, 1 Sep 2009 18:57:55 +0000 Message-ID: From: "b. f." To: freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: pschmehl_lists@tx.rr.com Subject: Re: remove newlines from a file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 18:57:57 -0000 Paul Schmehl wrote: >I found a sed tutorial once that did this, but I can't seem to find it again. >I have a file with multiple lines, each of which contains a single ip followed >by a /32 and a comma. I want to combine all those lines into a single line by >removing all the newline characters at the end of each line. > >What's the best/most efficient way of doing that in a shell? paste(1)? b.