Jim Meyering wrote:
Guido Flohr wrote:
Sure. But compare that to:
rm -p $file
Clearer and more efficient to boot.
It is hard to justify adding an option to GNU rm when you can get
the desired functionality via a tiny shell script:
#!/bin/bash
fail=0
for f in "$@"; do
unlink "$f" || { fail=1; continue; }
parent=$(dirname "$f")
rmdir -p "$parent" || fail=1
done
exit $fail
Or even simpler because "rmdir -p" never has a zero exit-status.
But if I compare that to "ls -B" which is ridiculously easy to replace,
the option "-p" for rm is a lot more useful. Besides, you could also
get the functionality of "rmdir -p" with a tiny shell script.
Utilities are meant to make life easier, and I think that the option -p
is just as useful for rm as it is for rmdir.
Cheers,
Guido
--
Империя ООД | Imperia OOD
ул. „Княз-Борис-I“ № 86, София 1000 | ul. "Knyaz-Boris-I" № 86, Sofia
http://www.imperia.bg/
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils