Gerhard Fiedler wrote: > Dave Tweed wrote: > > On a modern system (since the mid-1970s -- note the irony there), such > > as any *ix shell, the shell itself correctly handles ALL of the > > command-line issues, and passes arrays of fully parsed arguments and > > environment variables directly to the application program. > > You said that in *ix environments, that's handled by the "shell". If you > mean the command processor (e.g. the bash shell), that would mean that > in *ix environments, you couldn't run a CLI application without going > through a command processor. I see we have some problems in terminlogy here. I use the generic definition of "shell", which is any program that interacts with a user and allows him to run other programs. There are graphical shells and text-based, or "command-line" shells. Windows supplies command-line shells called "command.com" and "cmd.exe" by default (plus the GUI shell/file browser called "explorer.exe"), and you can run other shells from third parties, such as 4DOS/4NT and Cygwin bash. > At least in Windows, you can run a CLI application directly, without a > command processor (like cmd.exe), so the command line argument handling > has to happen elsewhere (for example in the C runtime). You can in fact run ANY application directly from another application, just like you can run ANY application from the command line (text shell) or from the Explorer (graphical shell), since they (the shells), for the most part are just applications themselves. This is true on both Windows and *ix. Pretty much any application has a command line, even the ones that you think of a "GUI applications", but the details are mostly hidden from end users by the GUI shells. > I'm not really sure you're correct with your statement that in *ix this > all happens in the shell. I'm rather certain that it is possible to run > an executable on *ix without spawning a shell, so the command line > handling probably happens elsewhere. When you run an application directly, there is no "command line". The whole concept of a command line is entirely defined by whatever shell you happen to be using. If you really want command-line processing from within an application, one way or another, you need to invoke the corresponding shell to do it. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist