I stumbled across this little gem today. If from a page of how to shoot yourself in the foot in any programming language. It was full of how to shoot yourself in the foot in Visual Basic, Prolog, C++, and many others. But this one was the best.
UNIX:
% ls
foot.c foot.h foot.o toe.c toe.o
% rm * .o
rm: .o: No such file or directory
% ls
%
So the problem is that Unix doesn’t use file extensions? Isn’t that just a problem for a DOS user moving to Unix?
Unix does use file extensions, AFAIK…? This is not a unix-bash (pun not intended), the same command line could be used for Windows too.
But I just love the look on the users face who intended to delete the *.o files, misplaced a space and, well, shot himself in the foot. :)