bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mdate-sh broken on darwin


From: Stepan Kasal
Subject: Re: mdate-sh broken on darwin
Date: Tue, 8 Feb 2005 11:46:11 +0100
User-agent: Mutt/1.4.1i

Hello Alexandre,

perhaps I'm missing the context in which is mdate-sh executed, but
couldn't a file name with a space appear there?

On Sun, Feb 06, 2005 at 05:27:35PM +0100, Alexandre Duret-Lutz wrote:
> # On a POSIX system, we should have
> #
> # $# = 5
> # $1 = file size
> # $2 = month
> # $3 = day
> # $4 = year or time
> # $5 = filename
> #
> # On Darwin 7.7.0 and 7.6.0, we have
> #
> # $# = 4
> # $1 = day
> # $2 = month
> # $3 = year or time
> # $4 = filename
...
> case $# in
>  4) day=$1;;
>  *) day=$3; shift;;
> esac

Wouldn't the following be safer:

case $3 in
  ???*) day=$1;;
  *) day=$3; shift;;
esac

Have a nice day,
        Stepan Kasal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]