I found this kind of solution. While loop waits until omxplayer and fbi process has ended and then next image or video can be shown.
while ps ax | grep -v grep | grep -E "omxplayer|fbi" > /dev/null; do
sleep 0.1
done
I found this kind of solution. While loop waits until omxplayer and fbi process has ended and then next image or video can be shown.
while ps ax | grep -v grep | grep -E "omxplayer|fbi" > /dev/null; do
sleep 0.1
done