How do I get output from sage -c ?
Please compare:
$ Downloads/sage-4.5.3.rc0/sage -c 'is_prime(991)'
$ Downloads/sage-4.5.3.rc0/sage -c 'print is_prime(991)'
True
Should sage -c
also print to the standard output the result of the
command? That would seem a lot more useful. Right now Sage has to
get all fired up just to act as a once-off calculator. But maybe this
is actually a feature, consistent with other programs that one can
call in once-off fashion?
What do you suggest as an alternative? Perhaps a "-p" flag? Perl has a flag to loop over stdin and do similar things. Please state constructive input, thanks. :)
I'm not sure what you mean. I want to be able to just send a Sage command to Sage and get a result, without having a whole Sage session open up, and don't want to have to use the print argument (because I will always forget to do so). Why isn't printing the output the default behavior?