This on its own works beautifully, and I have tinkered with it to get it to say the sort of things I want, but as soon as I incorporate it into a script it causes the script to just exit and no progress bar shows. also how can i keep the progress bar up to date with how far along the script is? do i need to break this example down and give each section of the script a pipe into the yad progress bar with the next starting percentage e.g. 1st part of script goes to 20%, next part starts at 20% and goes to 30% etc. Here is an example of what i have (however i want this first bit to make up only 10 % of the progress):
for ((i=1; i<=100; i++))
{
echo $i
echo "# Remaining $((100-i))% to finish the job"
sleep 0.2
} | yad --progress --pulsate --center --percentage=0 --log-expanded --enable-log --width=500 --height=200 --size=fit --text="testing..." --button=cancel:0 --auto-kill --auto-close
FILE=~/"tmp/test.txt"
STRING="S1_L001_"
if [ ! -z $(grep "$STRING" "$FILE") ]
then
if [ -f ~/output/output.txt ]
then
echo "output already exists, running next
"
echo | notify-send "output already exists, running next
"
elif [ -f ~/Input/input.txt ]
then
echo | notify-send "input present and not previously run, running now" | echo "input present and not previously run, running now
"
else
echo | notify-send "input required is not present, trying next" | echo "input required is not present, trying next
"
fi
fi