Re: rm(1) bug, possibly serious




Dan Nelson wrote:
Oliver Fromme said:
The expansion of "*" does not include "." or "..".

Under /bin/sh, ".*" does match "." and "..", so be careful :)

For that reason I got used to type ".??*" instead of ".*"
since I started with UNIX almost 20 years ago. ;-)

Apart from that, zsh is my shell of choice. It never
matches "." or ".." with any globbing patterns. I think
no shell should. I would submit an appropriate patch
for FreeBSD's sh if it would be committed, but I doubt
it would. Even this discussion here about an obvious
bug in rm has bikeshed tendencies. :-(

Best regards
Oliver

--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd

C++: "an octopus made by nailing extra legs onto a dog"
-- Steve Taylor, 1998
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: jlogin.sh - a small nice jails helper!
    ... standard shell. ... processes running in jails, ordered by jail IDs: ... Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. ... Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: ...
    (freebsd-stable)
  • Re: how to view environment variables
    ... Chris Whitehouse wrote: ... current shell. ... Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. ... Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: ...
    (freebsd-questions)
  • Re: /libexec/ld-elf.so.1: environment corrupt; missing value for
    ... The shell is zsh. ... the ports tree about a month ago. ... Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. ... Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: ...
    (freebsd-current)
  • Re: bash: is nested parameter expansion possible?
    ... what you're seeing in bash is rightfully considered as a bug ... >> It is not a bug, but an important part of the design of the shell ... > zsh happens to be the only shell that does just that. ...
    (comp.unix.shell)
  • Re: switching shells
    ... > 3) and needs to use arrays fairly often in scripts ... Can /sh handle arrays, or if I'm going to have arrays ... > interactive shell) I'd like to know what shell is recommended for me. ... zsh has a POSIX conformant mode that can be used to run POSIX ...
    (comp.unix.shell)