Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932451AbXAWBAx (ORCPT ); Mon, 22 Jan 2007 20:00:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932581AbXAWBAx (ORCPT ); Mon, 22 Jan 2007 20:00:53 -0500 Received: from fgwmail9.fujitsu.co.jp ([192.51.44.39]:58239 "EHLO fgwmail9.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451AbXAWBAw (ORCPT ); Mon, 22 Jan 2007 20:00:52 -0500 X-Greylist: delayed 1956 seconds by postgrey-1.27 at vger.kernel.org; Mon, 22 Jan 2007 20:00:51 EST Date: Tue, 23 Jan 2007 09:26:22 +0900 Message-ID: <87sle2mvv5.wl%takeuchi_satoru@jp.fujitsu.com> From: Satoru Takeuchi To: Richard Knutsson Cc: Michal Piotrowski , Ingo Molnar , Noah Watkins , linux-kernel@vger.kernel.org Subject: Re: [PATCH -rt] whitespace cleanup for 2.6.20-rc5-rt7 In-Reply-To: <45B54BE7.5030805@student.ltu.se> References: <11693256381932-git-send-email-nwatkins@ittc.ku.edu> <20070122195836.GC21277@elte.hu> <6bffcb0e0701221354j341e9f07s761c6c049d7196ce@mail.gmail.com> <45B54BE7.5030805@student.ltu.se> User-Agent: Wanderlust/2.15.4 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1375 Lines: 55 At Tue, 23 Jan 2007 00:42:31 +0100, Richard Knutsson wrote: > > Michal Piotrowski wrote: > > How about this script? > > > > "d) Ensure that your patch does not add new trailing whitespace. The > > below > > script will fix up your patch by stripping off such whitespace. > > > > #!/bin/sh > > > > strip1() > > { > > TMP=$(mktemp /tmp/XXXXXX) > > cp "$1" "$TMP" > > sed -e '/^+/s/[ ]*$//' <"$TMP" >"$1" > > rm "$TMP" > > } > > > > for i in "$@" > > do > > strip1 "$i" > > done > > " > > http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt > I believe: > > for i in "$@"; do \ > sed --in-place -e "s/[ ]+$//" "$i" > done > > will do as well... Hi Richard, IIRC, `+' is extended regex, so -r option is needed: sed -r --in-place -e "s/[ ]+$//" "$i" Satoru Takeuchi > > Richard Knutsson > > - > 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/ - 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/