lkml.org 
[lkml]   [2007]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -rt] whitespace cleanup for 2.6.20-rc5-rt7
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 :)

-
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/

\
 
 \ /
  Last update: 2007-01-23 22:13    [W:0.044 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site