我试图从gnuplot内部执行一些命令,但出现错误。 据我了解我应该使用“!”在命令之前。 这是我的脚本:无法从gnuplot执行shell命令
echo "
set terminal dumb
!OUT=$(adb shell dumpsys meminfo $PID | grep TOTAL)
!OUT=$(echo $OUT | sed -r 's/ +/ /g' | cut -d ' ' -f 2-)
!echo $OUT >> adbmon.log
plot 'adbmon.log' using 1:6 title 'Free'
" > sample.gp && gnuplot sample.gp
我在做什么错? 谢谢你的时间!
如果您显示错误,它将有所帮助。我不知道你在这里实际尝试的是什么,似乎比需要复杂得多。 – Bernhard