Hey everyone!
I wanted to start a thread about really clean and good looking bash commands. I'll start off.
I make os testbeds a lot out of older computers with floppy drives. To test if there is a floppy in the drive:
if sudo dd if=/dev/null of=/dev/fd0 >/dev/null 2>&1; then
echo "Floppy is in drive 0."
else
echo "No floppy in drive 0."
fi
It just tries to write null to the floppy and if there is an error then there is no floppy in the drive.
I thought this was pretty sweet when I came up with it :D