Question: is it possible to run cmaple giving it one command as input?

To run Maple script, on windows, I type

cmaple.exe   my_file.mpl

and this works well. So if my_file.mpl has the line int(sin(x),x);  the result of the above is:

> int(sin(x),x);
                                                        -cos(x)
> quit
memory used=0.9MB, alloc=8.3MB, time=0.05

 

sometimes, it will be nice to use cmaple to quickly do one time calculation on the fly such as the above, without having to open Maple GUI or write/edit a file. For example, I'd like to be able to do something like

cmaple.exe   "int(sin(x),x);"

but ofcourse the above does not work as is, since it expects its input to be a file. I tried

cmaple.exe   << "int(sin(x),x);"

but that did not work (for obvious reasons, since the input string is not a file name).

I tried different re-directions, as shown in this page for windows, but maple expects the input to be a file.

Is there a way to use cmaple with command directly written as string as above? I am using Maple 2015.

 

Please Wait...