I thank you once again for helping me suicidaleggroll.
Code:
# prompt the user for a file name
NAME=$(zenity --entry --text='Enter a name for the movie')
exitstat=$?
if [[ -z "$NAME" || $exitstat -ne 0 ]]; then
echo "Cancelled"
exit
fi
You are correct in saying I do not need (or want) the number "1" to be added to files of the same name (temp) since I am typing a unique name to start with. But using the new script you suppled caused the output file to be an unplayable text file so I made this sleight modification:
Code:
# prompt the user for a file name
NAME=$(zenity --entry --text='Enter a name for the movie')
exitstatus=$?
if [[ -z "$NAME" || $exitstat -ne 0 ]]; then
echo "Cancelled"
exit
fi
I changed "stat" to "status". Now it works perfectly. And the new script will now honor this line:
meaning I can change what directory the movie will be saved it, unlike the way it was before.
And I had to uncomment this line:
Code:
# We're back - Clean up now!
kill $CHILD_PID
#wait
To me you are a genius.
Thank you again,
Roy
PS
FYI,
The bottom section in the original script (before modification) was commented out, but the purpose of it was so you could watch "live tv" without saving the file, meaning when the script was executed, you could watch what was being recorded and once you closed the player, the script would delete the recording. I mean, nobody would necessarily want to save the recording anyway if all they wanted to do was watch live tv. But once the bottom section was commented out, the movie file would remain for thise who wanted to keep the recording. I have always been impressed with this script.
Code:
# How much 'cleaning' should we do?
if [ "$1" != "-k" ]
then rm -f "$VIDEO_NAME"
else echo "What you've just seen is at $VIDEO_NAME"
fi