Answer the question
In order to leave comments, you need to log in
Where to add sort --random-sort to the script?
Hey! Where to add the option | sort --random-sort to randomize the video being played?
#!/bin/sh
VIDEOPATH="/mnt/storage/videos"
SERVICE="omxplayer"
while true; do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
sleep 1;
else
for entry in $VIDEOPATH/*
do
clear
omxplayer $entry > /dev/null
done
fi
done
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question