摘要:
代码: import os status = os.popen('bash ~/Desktop/test.sh') # 使用os.popen获取执行后的数据 print(status.read()) 非常好用 阅读全文
posted @ 2022-04-09 23:16
睡觉不困
阅读(442)
评论(0)
推荐(0)
摘要:
在shell脚本中,想要将java程序运行后的结果获取到,执行如下脚本即可 #! /bin/sh result=$(java -cp /home/linux/Desktop/RubikRobot.jar cn.itcast.main | tail -l) echo ${ids[@]} 阅读全文
posted @ 2022-04-09 23:14
睡觉不困
阅读(615)
评论(0)
推荐(0)

浙公网安备 33010602011771号