Package: coreutils
Version: 7.4-2
Severity: wishlist
I wish rm remained silent when it is given no argument. Currently, it
complains and returns 1:
$ rm
rm: missing operand
Try `rm --help' for more information.
$ echo $?
1
$
Doing nothing is the most natural boundary condition:
$ rm this that # removes this and that
$ rm this # removes this
$ rm # removes nothing
and is convenient in scripting; for example
# This is a Makefile
clean:
rm ($wildcard *.o)
If this proposed modification isn't feasible, I wish rm had a
"--quiet" option instead:
$ rm -q # does nothing; returns 0.
Currently, "-f" is often used to suppress errors
# This is a Makefile
clean:
rm -f ($wildcard *.o)
but this has an undesirable side effect of unwittingly removing
readonly files.
Best regards,
Ryo
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages coreutils depends on:
ii libacl1 2.2.47-2 Access control list shared library
ii libattr1 1:2.4.43-3 Extended attribute shared library
ii libc6 2.9-12 GNU C Library: Shared libraries
ii libselinux1 2.0.82-1 SELinux shared libraries
coreutils recommends no packages.
coreutils suggests no packages.
-- no debconf information
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.