The counterpart of python-shell's underscore variable in tcsh?

大城市里の小女人 提交于 2019-12-10 22:26:55

问题


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.



来源:https://stackoverflow.com/questions/15056573/the-counterpart-of-python-shells-underscore-variable-in-tcsh

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!