I want the output ofstdbuf -i0 -o0 -e0 jack_cpu_load | sed -n 's/[A-Za-z]*//g;s/ //g;s/.\{4\}$//;9,$p'to be displayed in Conky but, I suspect, Conky is starting the script with every refresh and the script is too slow producing an output for anything to show.Or, maybe it's something else entirely.I used ${execp /path/to/script.sh}Is there a way to let the script run and for Conky to sample the output. Provided my theory is correct. shrugsEdit: I'm working on sending the output to a file then having Conky read that, but I'm having a hard time getting it to overwrite the file.The closest I've gotten so far is, stdbuf -i0 -o0 -e0 script.sh > file.log but that just keeps appending the output to the file until I stop and start it again.
Shell script too slow for output to Conky
shell script;conky
You should say that this is related to Pipe output of jack_cpu_load through sedSo you wish to extract the float values from this outputjack DSP load 0.163633jack DSP load 0.159914jack DSP load 0.159449jack DSP load 0.164087jack DSP load 0.159971Never heard of conky before. Looks cool.What I would do here:Do not call the executable each time but have jack_cpu_load write into a circular buffer (I multiply by 100 because I'm not sure what conky does to floats)stdbuf -oL jack_cpu_load | grep --line-buffered jack DSP load | stdbuf -oL cut -d' ' -f4 | while read line; do echo scale=0; $line*100/1 | bc -l > /tmp/buffer; done &Read the buffer from conky:${tail /tmp/buffer 1 1}Or draw a bar${execbar cat /tmp/buffer}or ${execibar 1 cat /tmp/buffer}I have no X here, but I'll let you try :)PS. Also found this on stack overflow (https://stackoverflow.com/questions/5427936/mpd-lua-conky) which shows other possibilities