public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: Richard Knutsson <ricknu-0@student.ltu.se>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Noah Watkins <nwatkins@ittc.ku.edu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -rt] whitespace cleanup for 2.6.20-rc5-rt7
Date: Tue, 23 Jan 2007 09:26:22 +0900	[thread overview]
Message-ID: <87sle2mvv5.wl%takeuchi_satoru@jp.fujitsu.com> (raw)
In-Reply-To: <45B54BE7.5030805@student.ltu.se>

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/

  reply	other threads:[~2007-01-23  1:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-20 20:40 [PATCH -rt] whitespace cleanup for 2.6.20-rc5-rt7 Noah Watkins
2007-01-22 19:58 ` Ingo Molnar
2007-01-22 21:21   ` noah
2007-01-22 21:54   ` Michal Piotrowski
2007-01-22 23:42     ` Richard Knutsson
2007-01-23  0:26       ` Satoru Takeuchi [this message]
2007-01-23 20:32         ` Richard Knutsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sle2mvv5.wl%takeuchi_satoru@jp.fujitsu.com \
    --to=takeuchi_satoru@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=mingo@elte.hu \
    --cc=nwatkins@ittc.ku.edu \
    --cc=ricknu-0@student.ltu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox