Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell 如何在ubuntu上运行bash中的stdout输出_Shell_Stdout - Fatal编程技术网

Shell 如何在ubuntu上运行bash中的stdout输出

Shell 如何在ubuntu上运行bash中的stdout输出,shell,stdout,Shell,Stdout,例如,如果我想使用echo'clear'|$\uz或echo'导入子流程;子进程调用('clear',shell=True);'|python-c$在ubuntu或linux终端上是否可以使用stdout并运行它?我相信我误用了$\ucode>,因为这只是运行了前面的命令 例如,我有一个python命令,它是Base64编码的cHJpbnQoImhlbGxvIHdvcmxkIik=解码为print(“hello World”),通过命令行我尝试了echo'cHJpbnQoImhlbGxvIHdv

例如,如果我想使用echo
'clear'|$\uz
echo'导入子流程;子进程调用('clear',shell=True);'|python-c$
在ubuntu或linux终端上是否可以使用stdout并运行它?我相信我误用了
$\ucode>,因为这只是运行了前面的命令

例如,我有一个python命令,它是Base64编码的
cHJpbnQoImhlbGxvIHdvcmxkIik=
解码为
print(“hello World”)
,通过命令行我尝试了
echo'cHJpbnQoImhlbGxvIHdvcmxkIik='| Base64-d | python-c$
并获得一个回溯
回溯(最近一次调用):File“”,第1行,在NameError中:未定义名称“self”
如何使其运行stdout的结果或将其作为变量在一行中使用。我意识到这是一个奇怪的问题,我只是想了解如何使用或访问stdout上的信息。感谢您的时间和投入,非常感谢


更新仍然不走运我也尝试了
echo'cHJpbnQoImhlbGxvIHdvcmxkIik='| base64-d>$1 | python-c$1
和revieve
错误:不明确重定向>$1

结果确实显示了base64解码的消息,但没有运行您尝试过的
echo…|base64-d| python-