This is in continuation to the question in Infix form of PutAppend ( >>> ) does not work with variable.
I was trying to use
MakeExpression[RowBox[{lhs_, ">>>", rhs_String}], form_] :=
MakeExpression[
RowBox[{"PutAppend", "[", RowBox[{lhs, ",", rhs}], "]"}],
form
] /; ! StringMatchQ[rhs, "\"*\""]
In terminal, so that
out= "new"<>"file";
{5,5^2}>>>out
would send the expression into "newfile". However the suggested solution failed.
How do I use MakeExpression in a terminal session?
Or otherwise use >>>
in terminal for a filename stored in an expression?
MakeExpression). Things typed into a terminal are just text. They're interpreted by the kernel's built-in parser, which cannot be changed or hacked. Generally, stuff relying on boxes will only work in notebooks and requires a front end. An example is the Notations package, which is not usable from the terminal. – Szabolcs Aug 12 '15 at 13:45UsingFrontEnd. – Silvia Aug 14 '15 at 07:46