Hi All
Can anybody explain how I can add all movie files in a given folder into an
array, and then play them using bash?
I have a folder full of various format movie files which I want to play
sequentially using VLC. I have got it working with a for loop:
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for f in $FILES
do
echo "Processing $f file..."
vlc $f
done
IFS=$SAVEIFS
but I have to use Ctrl-C after each play to move onto the next movie. I would
like to have each movie play to completion, and then the next one start
straight away. The eventual plan is to take some user input after each movie
has played (assigning a numeric category 1-9) but that will come later. I'd
just like to get the display part working smoothly before I move on. I was
thinking that passing the files into an array, then using an "if" or "while"
statement to play them might be a better way. Something along the lines of
"if/while another file exists - play the next - else - exit", but I am past the
limits of my bash skills.
I have had a look around the web but can't seem to find anything that makes
sense.
Any help appreciated.
Stu
_______________________________________________
Peterboro mailing list
Peterboro@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/peterboro