Subject: mailing-list for TeXmacs Users
List archive
From : Martin Costabel <address@hidden>- To: address@hidden
- Subject: Re: Re : [TeXmacs] Maxima and Texmacs
- Date: Tue, 26 Aug 2008 11:44:18 +0200
Andrey G. Grozin wrote:
[]
The problem with the above files is that Joris says that they don't work on his Mac. I tried them on my friend's Mac notebook, and they work fine. The difference can be traced to a single 'sed' command which extracts 3 components of the maxima version from a line which contains them. The following line (when executed in /bin/sh ):
echo 'version 5.16.3, lisp sbcl' |\
sed -e 's/^version \([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\).*$/\1 \2 \3/'
should produce
5 16 3
according to sed documentation, and it does so on Linux. It does so also on my friend's Mac. Joris says that it does not on his Mac.
Your friend probably has a 3rd-party GNU sed installed (from Fink, for example). Apple's /usr/bin/sed is BSD sed and doesn't know (in its basic regex mode) about '\+'.
What works for me with both flavors of sed is the following
echo 'version 5.16.3, lisp sbcl' |\
sed -e 's/^version \([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/'
Actually, it works the same way also with the simpler
echo 'version 5.16.3, lisp sbcl' |\
sed -e 's/^version \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1 \2 \3/'
but this is not logically equivalent to your regex.
--
Martin
- Re : [TeXmacs] Maxima and Texmacs, Andrey G. Grozin, 08/26/2008
- Re: Re : [TeXmacs] Maxima and Texmacs, Martin Costabel, 08/26/2008
Archive powered by MHonArc 2.6.19.