From owner-freebsd-questions@FreeBSD.ORG Tue Sep 1 18:32:13 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 E81811065670 for ; Tue, 1 Sep 2009 18:32:13 +0000 (UTC) (envelope-from prvs=488681940=pschmehl_lists@tx.rr.com) Received: from ip-relay-001.utdallas.edu (ip-relay-001.utdallas.edu [129.110.20.111]) by mx1.freebsd.org (Postfix) with ESMTP id B8F4D8FC17 for ; Tue, 1 Sep 2009 18:32:13 +0000 (UTC) X-Group: RELAYLIST X-IronPort-AV: E=Sophos;i="4.44,313,1249275600"; d="scan'208";a="17185420" Received: from smtp3.utdallas.edu ([129.110.20.110]) by ip-relay-001.utdallas.edu with ESMTP; 01 Sep 2009 13:03:19 -0500 Received: from utd65257.utdallas.edu (utd65257.utdallas.edu [129.110.3.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTPSA id 958CD4EF4A for ; Tue, 1 Sep 2009 13:03:19 -0500 (CDT) Date: Tue, 01 Sep 2009 18:03:19 +0000 From: Paul Schmehl To: FreeBSD Questions Message-ID: X-Mailer: Mulberry/4.0.6 (Linux/x86) X-Munged-Reply-To: Figure it out MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: remove newlines from a file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 18:32:14 -0000 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? -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson