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 Thu, 2006-03-09 at 10:45 +0200, Pavel Tsekov wrote: The \? is GNU extension Is it? From the GNU sed info manual: `\?' As `*', but only matches zero or one. It is a GNU extension. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
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. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
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 ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
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: The \? is GNU extension Is it? Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel