I'm using Kazam for screen recording and I want to shutdown the screen recorder after a certain time.
I've written a bash script but unfortunately it seems to destroy the video that kazam is working on.
bash script so far:
Code: Select all
#!/bin/bash
program=$1
hour=$2
minutes=$3
seconds=$4
hourSEC=$((hour*60*60)) #convert to seconds
minutesSEC=$((minutes*60)) #convert to seconds
echo ""
echo "Hours in sec" : "$hourSEC
echo "Minutes in sec: "$minutesSEC
echo "Seconds :"$seconds
echo ""
total=$((hourSEC+minutesSEC+seconds))
sleep $total
pkill $1
echo "Done."
echo ""