Plan 9 from Bell Labs’s /usr/web/sources/plan9/rc/bin/eject
#!/bin/rc switch($1){ case 0 echo eject > /dev/fd0ctl case 1 echo eject > /dev/fd1ctl case * echo eject > /dev/fd0ctl }