Baby-sitting bash script using DVD drive
These days a -T (toggle) argument exists. That allows us to make this a lot neater:

watch -n0 eject -T


You can alter the delay between rocks by changing the -n0 argument.


  watch is used to run any designated command at regular intervals.


http://www.linfo.org/watch.html