Leo Butler <l_butler at users.sourceforge.net> writes:
> > 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.
Yes. Sorry, I misunderstood what your original message meant. I thought
that you meant it wasn't possible to run a command with a different
working directory; my example was to show how.
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130110/433ad06b/attachment.pgp>