-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to dusan halicky on 2/1/2007 3:35 AM:
> Hi.
> 
> 
> 
> Why the hell `basename` from coreutils package cannot act like filter?

Thanks for the report.  First, a word of advice - remember the adage that
'you catch more flies with honey than vinegar'.  Your tone came across as
very demanding and sour, and that is less likely to elicit a reasonable
response.

> # echo /home/me/foo | basename
> 
> basename: too few arguments

Hmm - making basename (and also dirname) a filter is compatible with
POSIX: since POSIX requires a single argument, we can define operation
with a missing argument however we want (or in other words, our current
definition of issuing an error is not mandated).  If we do that, then we
would also need to add something like xargs' -0 option, so that you could
filter on NUL terminated (rather than whitespace-terminated) strings for
safety when operating on arbitrary file names.  I think the idea is
worthwhile, but now someone needs to write a patch and contribute it.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFwedL84KuGfSFAYARAohbAJ9khf36GU2Ytz4yuso6nTlYn0roCwCgqV9B
VDK1G676QHKxIJ7MbsKoFbE=
=v0C9
-----END PGP SIGNATURE-----


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to