fabric:致命错误:local()在执行时遇到错误(返回代码1)

时间:2016-11-30 08:17:05

标签: python local fabric

以下错误

>>> local("cat /tmp/11|grep '23'")
[localhost] local: cat /tmp/11|grep '23'
l100.cpu.total,2016-11-30 10:39:00,23.0

>>> local("cat /tmp/11|grep '23:12'")
[localhost] local: cat /tmp/11|grep '23:12'

Fatal error: local() encountered an error (return code 1) while executing 'cat /tmp/11|grep '23:12''

中止。

os中的

返回ok

(烧瓶)[root @ vq22flk01~] #cat / tmp / 11 | grep' 23:12'

1 个答案:

答案 0 :(得分:0)

您的错误消息:

Fatal error: local() encountered an error (return code 1) while executing 'cat /tmp/11|grep '23:12''

不要多次使用''。

相反,你可以这样写:“cat / tmp / 11 | grep '23:12'”

希望它有所帮助!!