From owner-freebsd-questions@FreeBSD.ORG Wed Oct 7 06:45:37 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 BE1FB10656A3 for ; Wed, 7 Oct 2009 06:45:37 +0000 (UTC) (envelope-from the.real.david.allen@gmail.com) Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185]) by mx1.freebsd.org (Postfix) with ESMTP id 97F668FC1B for ; Wed, 7 Oct 2009 06:45:37 +0000 (UTC) Received: by pzk15 with SMTP id 15so4146818pzk.3 for ; Tue, 06 Oct 2009 23:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=3V1DchaKieemhN8jW6GrbTb4oOm0Y2u52o3AsBvritU=; b=i14Eh3OE/dNy/WSKtRUDvw1ilgYXtX88JP8C7bOOTL9C5pZA5OBgxen6zB9MJgDXJj lntbM16bXyrAu65fKqWx/1xFANt8RyQUy/qpqrHYe0MfsrV/nGdAiERAr+KMPxtnhKCn 2r5VC4P4MqK+qDmIjZ+t60ckI709YaVSQD1H4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TZDyGiY1uxAChfMCHH/UBvb7x8STLNNtIogI0Dy2TV8wiTbapS0DIKWK4Ugkdemc4u 10NPHoWaUYs8LSdLGFNjAmREHmHgl2dEBJinhmRpGcuXhVlbt5+ZAvVbNi7EnIRKky1L 09G0nLTkceW0/y8qM7onbMl1xfZdlwWQlyYSI= MIME-Version: 1.0 Received: by 10.143.26.41 with SMTP id d41mr168833wfj.228.1254897936838; Tue, 06 Oct 2009 23:45:36 -0700 (PDT) Date: Tue, 6 Oct 2009 23:45:36 -0700 Message-ID: <2daa8b4e0910062345r83fa23aj113b062af114887f@mail.gmail.com> From: David Allen To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: A general sed question 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: Wed, 07 Oct 2009 06:45:37 -0000 I keep bumping up against this, so I thought I'd throw this question out to those who understand sed better than I do. What I'm trying to do is to clean up the contents of some files (/sys/i386/conf/GENERIC would be a good example) to get more readable diffs. To that end, I'm trying to use sed to - delete commented lines - remove inline comments - remove trailing spaces and/or tabs - delete blank lines, and/or lines containing just spaces and/or tabs - expand tabs Thanks!