The counterpart of python-shell's underscore v

2019-07-14 07:06发布

问题:

Is there any way to make tcsh keep the output of the last command in a special variable?

I know I can capture the output using backticks, but if I don't use backticks in the first place, it's not captured anywhere. (anyone who likes the underscore variable in the python shell knows what I'm talking about)

E.g.

% ls | head -2
% echo $_OUT_
-> myfile1 myfile2

回答1:

This page lists the special variables of tcsh and does not specify that there is a special variable for what you are looking for.

Also, here is a possible duplicate of your question.



标签: python tcsh