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]
Message-ID: <CAHp75VeybOch9xUwy5vtufenBA2unb61sGAVoCdTpy2tRcCxLg@mail.gmail.com>
Date:   Fri, 11 Jun 2021 12:41:55 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Nicolas Dichtel <nicolas.dichtel@...nd.com>,
        Joe Perches <joe@...ches.com>, Jason Baron <jbaron@...mai.com>,
        Stefani Seibold <stefani@...bold.net>,
        Jacob Keller <jacob.e.keller@...el.com>,
        Thomas Graf <tgraf@...g.ch>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Jens Axboe <axboe@...nel.dk>, Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] scripts: add spelling_sanitizer.sh script

On Fri, Jun 11, 2021 at 12:30 PM Leizhen (ThunderTown)
<thunder.leizhen@...wei.com> wrote:
> On 2021/6/11 15:58, Andy Shevchenko wrote:
> > On Fri, Jun 11, 2021 at 10:19 AM Zhen Lei <thunder.leizhen@...wei.com> wrote:

...

> >> +# Convert the format of 'codespell' to the current
> >> +sed -r -i 's/ ==> /||/' $src
> >> +
> >> +# Move the spelling "mistake||correction" pairs into file $tmp
> >
> >> +# There are currently 9 lines of comments in $src, so the text starts at line 10
> >> +sed -n '10,$p' $src > $tmp
> >> +sed -i '10,$d' $src
> >
> > This is fragile, use proper comment line detection.
>
> I've thought about that too. But I'm wondering if it needs to be that
> complicated.
>
> Think about it. It's not something for personal temporary use, so it
> should be perfect. I'll change to dynamic computing.

sed has a possibility to choose between two anchors.

Google for `sed -e '/anchor 1/,/anchor 2/'` expressions. So, it will
be less complicated than current code.


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ