Re: [PATCH] Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz



On Thu, 9 Mar 2006, Leonard den Ottolander wrote:

> On Wed, 2006-03-08 at 17:50 +0200, Pavel Tsekov wrote:
> > 2005 control.tar.gz
>
> It appears ar is the app which uses 4 field dates that I was looking
> for ;-s . Please try the following patch against vfs/extfs/uar. It
> removes the fourth date field from the ls output.

The patch behaves well on Linux (with GNU tools), but not on Solaris for
example.

+	thisyear="$(date +%Y)"

This should be changed to:

	thisyear="`date +%Y`"

Why is this necessary:

+	$XAR tv "$1" | sed 's,^,-,;s, , 1 ,;s,/, ,' | sed -e "s/\(.\?\)\([0-2][0-9]\:[0-5][0-9] \)\(${thisyear} \)\(.*\)/\1\2\4/" | sed -e "s/\(.\?\)\([0-2][0-9]\:[0-5][0-9] \)\([0-2][0-9][0-9][0-9] \)\(.*\)/\1\3\4/"
                                                                ^^^^^^^

The \? is GNU extension and I don't really understand why that construct
is necessary (I am not a regex guru though) so can you explain ?

> Since it is impossible to distinguish between 3 and 4 field dates and
> the implementation of a separate path for 3 and 4 field dates is not
> trivial the approach should always be to strip down 4 field dates to 3
> fields.

I agree. Determining the date format could be achieved but it is not a
trivial task and I am not really sure that it is so important after all.



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