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



Hi Pavel,

On Thu, 2006-03-09 at 10:45 +0200, Pavel Tsekov wrote:
> 	thisyear="`date +%Y`"

I assumed the $(command) was portable. If not I need to restore the
backticks in mc.wrapper.sh as well.

> 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 ?

The .* matches greedily, so a file name containing a time would be
matched instead of the actual time. This is why I used the '?'. Is there
a non GNU equivalent for a non greedy match?

I'm no regex guru either, so input on how to do this better is
appreciated.

By the way, instead of a pipe the second expression should only be used
if the first didn't match. The current construct strips the year of a
file with a name that starts with a year and has a date in this year
(i.e. "01:23 2006 2005 bla").

> 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.

I'll document the fact that dates being passed to vfs_parse_ls_lga()
need to be parsed back to 3 fields.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research





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