Christian Smith wrote:
I found it funny, while looking through Dr Dobbs journal some time ago, about a columnist (Al Stevens, I think!) being surprised that under UNIX, such things as filename globbing was done by the shell, and all main() usually gets is a list of valid filenames. Under DOS and Windows, given:
C:\Temp> grep foo *
The '*' would have to be interpreted and expanded by the grep program, but under UNIX, the list of files is generated by the shell. Of course, you can get decent shells on Windows as well, but generally only as ports of UNIX shells.
I guess the UNIX folks just didn't know any better way back then. Putting globbing in the API instead of the shell is a much better approach, but that wasn't all that obvious when UNIX first came along.
-- http://www.velocityvector.com/ | "F--- 'em all. That's how I feel." http://www.classic-games.com/ | -- Michael Moore on small business http://www.indie-games.com/ |