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

Pavel Tsekov ptsekov at gmx.net
Fri Mar 10 08:34:42 UTC 2006


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

> 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 referred as the historical syntax in all sources that I
managed to find. The $(...) is the new and improved syntax. As long
as we use /bin/sh I think we should not assume that it is capable of the
new syntax.

$ uname -a
SunOS sole 5.10 Generic_118822-11 sun4u sparc SUNW,Sun-Blade-1000
$ thisyear="$(date +%Y)"
$ echo $thisyear
$(date +%Y)

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

As far as I understand .\? will match a single char (any char) or no char
at all so if we have (output of "ar tv"):

-rw-r--r-- 1 0 0      4 Oct 16 18:30 2005 debian-binary

so with your regex \(.\?\) matches the space character between
16 and 18:30. I don't see how this help with regard to the problem
you are describing above ?!



More information about the mc-devel mailing list