>From mailnull Thu Jan 10 09:45:52 2013
From: Rupert Swarbrick <rswarbrick at gmail.com>
Date: Thu, 10 Jan 2013 09:37:48 +0000
Content-Type: multipart/mixed;
boundary="===============6402493398074644284=="
--===============6402493398074644284==
Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1;
protocol="application/pgp-signature"
--=-=-=
Content-Type: text/plain
Volker van Nek <volkervannek at gmail.com> writes:
> 2013/1/10 Sean <seany at uni-bonn.de>:
>> Hello all
>>
>> Thanks for the replies, yes unfortunately I need regex, for analyzing some
>> strings, in string form.
>>
>> I will play around with sregex package, btw, is there a way for Maxima to
>> call external scripts (say perl), and get the output programetically, i.e.
>> not by pipe symbol, which one uses in the command line manual call?
>
> Maybe the system command allows what you want.
>
> (%i1) system("echo -n 'Maxima' | base64");
> TWF4aW1h
> (%o1) 0
> (%i2) system("pwd");
> /home/volker
>
> I run Maxima in a Linux terminal. This doesn't seem to work in
> wxMaxima or XMaxima. system("cd Foo"); wouldn't have any effect
> because you always get a new system thread (if I am not mistaken).
However:
Maxima 5.29.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) system("cd /");
(%o1) 0
(%i2) system("pwd");
/home/rupert
(%o2) 0
(%i3) system("cd /; pwd");
/
(%o3) 0
You are fooling yourself: try
system("pwd");
again. The problem is that you cd in subshell and then pwd in that
same subshell.
?xchir("/");
will change the pwd of the Maxima process.
Leo