All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
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 21:32:53 +0100	[thread overview]
Message-ID: <45B670F5.7030008@student.ltu.se> (raw)
In-Reply-To: <87sle2mvv5.wl%takeuchi_satoru@jp.fujitsu.com>

Satoru Takeuchi wrote:
> 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"
>   
Yes, so right! Just because I did not understood why to use -e instead 
of -r (and even commented on it), I put an -e...

Thanks for pointing it out :)


      reply	other threads:[~2007-01-23 20:31 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
2007-01-23 20:32         ` Richard Knutsson [this message]

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=45B670F5.7030008@student.ltu.se \
    --to=ricknu-0@student.ltu.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=mingo@elte.hu \
    --cc=nwatkins@ittc.ku.edu \
    --cc=takeuchi_satoru@jp.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.