lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Jan 2007 09:26:22 +0900
From:	Satoru Takeuchi <takeuchi_satoru@...fujitsu.com>
To:	Richard Knutsson <ricknu-0@...dent.ltu.se>
Cc:	Michal Piotrowski <michal.k.k.piotrowski@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Noah Watkins <nwatkins@...c.ku.edu>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -rt] whitespace cleanup for 2.6.20-rc5-rt7

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@...r.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ