0
尝试比较运行测试bash脚本前后的进程列表。遇到问题,因为ps返回1,我不知道如何比较我拥有它们之前和之后的情况。比较运行bash前后的进程列表
理想情况下,它看起来像这样。原谅粗糙的伪代码:
run-tests:
ps -x
export before=$?
# run tests and scripts
ps -x
export after=$?
# compare before and after
建议和意见赞赏。
通过awk输出ps的输出以返回退出代码。 –
当你说比较它们时,你的意思是测试它们是否相等,或者执行其他自动分析,或者将它们放在屏幕上,或者是什么? – Beta