This is an attempt to clean out my scripts and to stop using temporary files to pass data.
I have two scripts: ScriptA (aka, "loudmouth"), and ScriptB (aka, "watcher"):
while [ $i -lt 100 ];do
echo "Look at me count!$i"
while [ -d /proc/$PROC ];do
echo -en "\r" "`tail -n1 tmp.txt`"
( eval $1 ) &>tmp.txt & oneline $!
And you activate my current example with:
I would like to have these same results without using tmp.txt AND without changing loudmouth... in other words, I would like to stream data into a variable, and randomly read out the last line of that variable.
^_^ SO, to recap:
I currently write to a file continuously, and randomly read the last line of that file to see how the process is progressing.
I would like to write to a variable continuously, and randomly read the most recent line of that variable to see how the progress is progressing.