The rm(1) is little too simplistic to assume that trailing "/" is automatically a directory:
$ ls -l
lrwxrwxrwx 1 foo foo 15 Aug 12 10:53 monitor -> tmp/bug/monitor
$ rm monitor/
rm: cannot remove `monitor/': Is a directory
Whereas:
$ rm monitor
<no messages>
SUGGESTION
Please do a "unlink" regardless of checking if there is trailing slash
or not in the command line item string. If the unlink fails, then
return the error to the user.[*]
[*] there is no need to check "stat" either to verify that item is
non-directory as the error code of "unlink" would automatically notify
if the operation succeeds or not.
Unfortunately POSIX requires that path names with trailing slashes are
treated as if '.' had been appended to them, i.e. as directories. It
might be useful to implement a "--strip-trailing-slashes" option¹ for rm
so that you can create a suitable alias.
Cheers,
Sven
¹ http://www.gnu.org/s/coreutils/manual/html_node/Trailing-slashes.html
Hello, Good morning, We have gone through your samples from a partner and Here is our Order List. Please do bear in mind that we are very much in need of this order, quote your competitive prices. Kindly send the Order confirmation. Your early reply will be much appreciated. Best Regards, Maryanah Erwin. PT FINDORA INTERNUSA Jln Pahlawan 66 Kec. Arjawinangun 45162 CIREBON West-Java INDONESIA tel : +62 231 357334 fax: +62 231 357260 email: marketing@findora.com