Subject: bug#15092: Dirname Bug

From: Erik Auerswald <[email-masked]>
Date: Wed, 14 Aug 2013 11:45:58 +0200

Hello Axel,

On Wed, Aug 14, 2013 at 09:16:14AM +0200, Axel Spallek wrote:
> the following throw errors:
>
> dirname --to-0040257282759-in.wav
> dirname "--to-0040257282759-in.wav"
> dirname '--to-0040257282759-in.wav'
>
> IMHO at least the last two ones schould work.

If the arguments to a program start with a - or --, they are assumed to be
options. You can use -- to stop option processing:

$ dirname -- --to-0040257282759-in.wav
.

Quoting the arguments as in your last two examples does not affect this, as
the shell does not interpret leading - characters in the command line, the
program called does.

HTH,
Erik