[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] {maint} tests: tempdirs with restrictive permissions are cle
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH] {maint} tests: tempdirs with restrictive permissions are cleaned correctly |
Date: |
Mon, 21 Feb 2011 18:53:43 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
Hello Eric.
On Monday 21 February 2011, Eric Blake wrote:
> On 02/20/2011 04:39 AM, Stefano Lattarini wrote:
> >>> - find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
> >>> + find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
> >>> rm -rf "$$@"; \
> >>> fi;
> >>
> >> please don't remove the quoting from the ! here. It exists to
> >> facilitate copy and pasting commands from make output to the command
> >> line,
> >>
> > Why would the quoting being useful for that? As long as '!' is
> > whitespace-separated from the following word, it's regarded by
> > the shell as a literal character, even when the shell has history
> > substutution enabled, no? Or am I missing something?
>
> You're missing history expansion.
>
No, I'm not (but I did use a botched terminalogy, sorry about that);
quoting from above:
``As long as '!' is whitespace-separated from the following word, it's
regarded by the shell as a literal character, *even when the shell
has history substutution enabled*''
Just do 's/history substutution/history expansion/', and you'll see
what I really meant.
> ! is special in some interactive shells when not in POSIX mode.
>
See above.
> It's better to quote ! than to risk a spurious history expansion.
>
IMVHO adding an extra quoting is overkill unless you can point to a
shell that performs history expansion also for whitespace-separated
`!'. That said, I have no strong feeling on the matter, so if you
want to provide a patch anyway I think there might be good chances
that Ralf will accept it (and I certainly won't object).
Regards,
Stefano