# Is it possible to print more than last line with Get (<<) without using Print commands?

I want to run my Mathematica scripts from the terminal and I want it to print lines like MATLAB would. That is, suppress output by ending a line with ;, and otherwise print the output of the line. Get (<<) only prints the last line.

Without using Print[var] and saving variables after every line... Is this possible?

-
Your scripts ought to have Print[] lines somewhere in the file, then... –  Ｊ. Ｍ. Oct 31 '12 at 12:50
"...without using Print[var]..." - why? –  Ｊ. Ｍ. Oct 31 '12 at 14:42
I think adding // Print after every line is the best I can do, saves me from having to Print specific variables... –  user1788553 Oct 31 '12 at 14:43
without using Print[var] because I don't want to have to put in specific variables, I want a general solution... –  user1788553 Oct 31 '12 at 14:43
In that case, I suppose postfix application of Print[] is what you want, indeed. –  Ｊ. Ｍ. Oct 31 '12 at 14:45

You print by having a Print[] on the expression you want to print. End all other statements with ;.

fooToPrint = bar[...]; Print[fooToPrint];
fooNoPrint = bar[...];


e.g.,

a = 1 + 2;
Print[a];

b = 3 + 4;

a = b;
Print[a];

-