For a shell script that I'm writing, I need to test if there is a cd-r disk in /mnt/cdrecorder and if there is, test if the cd-r disk is blank (no filesystem exists).
i.e.
#!/bin/sh
while a cd-r disk in /mnt/cdrecorder is not present or
a cd-r exists but has already been written to...
do
eject /mnt/cdrecorder
echo "Insert a blank cd-r and press some key"
read some_key
done
./my_burn_script.sh
^---This loops until the user inserts a valid blank cd-r.
Thanks for any input.
i.e.
#!/bin/sh
while a cd-r disk in /mnt/cdrecorder is not present or
a cd-r exists but has already been written to...
do
eject /mnt/cdrecorder
echo "Insert a blank cd-r and press some key"
read some_key
done
./my_burn_script.sh
^---This loops until the user inserts a valid blank cd-r.
Thanks for any input.