Answer the question
In order to leave comments, you need to log in
Bash script to read line by line?
The script does not read all the lines in the file and the video playback does not occur except for the first one
#!/bin/sh
SERVICE="/usr/bin/omxplayer"
file="/home/pi/Documents/list.txt"
while read line; do
$SERVICE -b $line
done < $file
SERVICE="/usr/bin/omxplayer"
file="/home/pi/Documents/list.txt"
while read line; do
while ps ax | grep -v grep | grep omxplayer; do sleep 1s; done
$SERVICE -b $line
done <$file
Answer the question
In order to leave comments, you need to log in
Here's the same script, just finished :)
Where can I add sort --random-sort to the script?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question