How to write this bash script

debate.mkv can play for up to an hour

mplayer debate.mkv
rest for 60 seconds
sleep 60

how to write a script that plays mplayer debate.mkv for 4 minutes and sleep for 1 minute
until the debate.mkv is finished?

Jul.08,2021

you can use mplayer control mode, please refer to the following script

-sharp!/bin/bash
-sharp 41
set -e

movie=a.mp4
pipe=mplayer-input.fifo

mkfifo $pipe
mplayer -slave -input file=$pipe $movie >/dev/null 2>&1 &

while pgrep -P $$ mplayer >/dev/null 2>&1 ; do
    sleep 4m
    ( echo 'pause' > $pipe ) &

    sleep 1m
    ( echo 'pause' > $pipe ) &
done

rm $pipe
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c735-2bb69.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c735-2bb69.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?