Subject: Re: bug#9450: Bug report on 'dirname' : when jokers match several files

From: [email-masked]
Date: Wed, 7 Sep 2011 07:10:23 -0700

On 2011-09-07 at 09:21:45 +0200, [email-masked] wrote:
> Yes, my script doesn't care about the return code. I use the dirname
> to extract the path from a given file, and then do a 'cd' command to
> that path :
>     MY_PATH=`dirname $1`
>     cd $MY_PATH
> As you say, HP-UX dirname returns 1, but neveetheless outputs the path
> of the first argument, and it's just what I expected him to do ! :))

Place some quotes around the argument, so that the variable will expand
but the glob won't. Something like:
	MY_PATH=`dirname "$1"`
will probably do what you expect.

-- 
Confucius is inscrutable.
God is ineffable.
Beer is inevitable.