I'm trying to execute some commands from inside gnuplot, but I'm getting error. As far as I understand I should use "!" before command. Here is my script:
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
What am I doing wrong? Thank you for your time!