coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: false-positive failure of the root-removal test


From: Pádraig Brady
Subject: Re: false-positive failure of the root-removal test
Date: Thu, 15 Oct 2015 17:18:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 15/10/15 16:13, Jim Meyering wrote:
> Here's a small improvement:

>  # Strip that part off for the following comparison.
>  clean_rm_err_()
>  {
> -  sed "s/.*rm: /rm: /; \
> -       s/\(rm: it is dangerous to operate recursively on\).*$/\1 '\/'/"
> +  sed 's,.*\(rm: it is dangerous to operate recursively on\).*$,\1 '"'/',"
>  }

+1

I'd kept it separate (and slightly awkward), to make it
easier to document. You may want to tweak the comment
above about separate sed expressions.

thanks,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]