Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751125AbWE0MmN (ORCPT ); Sat, 27 May 2006 08:42:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751502AbWE0MmN (ORCPT ); Sat, 27 May 2006 08:42:13 -0400 Received: from linux01.gwdg.de ([134.76.13.21]:29839 "EHLO linux01.gwdg.de") by vger.kernel.org with ESMTP id S1751026AbWE0MmM (ORCPT ); Sat, 27 May 2006 08:42:12 -0400 Date: Sat, 27 May 2006 14:42:02 +0200 (MEST) From: Jan Engelhardt To: Jeff Garzik cc: Git Mailing List , Linux Kernel Subject: Re: [SCRIPT] chomp: trim trailing whitespace In-Reply-To: <447838EB.9060900@garzik.org> Message-ID: References: <4477B905.9090806@garzik.org> <447838EB.9060900@garzik.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 633 Lines: 22 >> Pretty long script. How about this two-liner? It does not show 'bytes >> chomped' but it also trims trailing whitespace. >> >> #!/usr/bin/perl -i -p >> s/[ \t\r\n]+$// > > Yes, it does, but a bit too aggressive for what we need :) > Whoops, should have been s/[ \t\r]+$// And the CL form is perl -i -pe '...' Somehow, you can't group it to -ipe, but who cares. Jan Engelhardt -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/