[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: basename sucks
From: |
Alfred M. Szmidt |
Subject: |
Re: basename sucks |
Date: |
Thu, 1 Feb 2007 14:21:48 +0100 (CET) |
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.
You won't be able to specify the suffix to remove if it is going to
behave like a filter, unless you add a option for that.
$ echo foo.h | basename --suffix=.h
foo
$
- basename sucks, dusan halicky, 2007/02/01
- Re: basename sucks, Eric Blake, 2007/02/01
- Re: basename sucks,
Alfred M. Szmidt <=
- Re: basename sucks, Eric Blake, 2007/02/01
- Re: basename sucks, Alfred M. Szmidt, 2007/02/01
- Re: basename sucks, Evan Hunt, 2007/02/01
- Re: basename sucks, Matthew Woehlke, 2007/02/01
- Re: basename sucks, Alfred M. Szmidt, 2007/02/01
- Re: basename sucks, Mike Frysinger, 2007/02/01
- Re: basename sucks, Bob Proulx, 2007/02/01
- Re: basename sucks, Alfred M. Szmidt, 2007/02/02
- Re: basename sucks, Bob Proulx, 2007/02/02
- Re: basename sucks, Matthew Woehlke, 2007/02/02