Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: [News] Everybody Uses the Command Line

In comp.os.linux.advocacy, Roy Schestowitz
on Wed, 02 Aug 2006 16:41:37 +0100
> You use Command Lines all the time and don't know it!!!
> ,----[ Quote ]
> | Man, the heat Linux catches over command lines! The flames! The trolls!
> | The clueless screaming for help! And all the while, command lines are
> | right under your nose the whole time! Yes, even on the most mousy,
> | GUI-driven, WIMPy, point-n-drool interface, whether it be Macs or
> | Microsofties, you're typing commands into prompts every day!
> `----
> http://penguinpetes.com/b2evo/index.php?p=156&more=1&c=1&tb=1&pb=1
> Quite a juvenile post, but a valid point is being made. No-one should fear
> the command-line interface, which is already mastered by all. Of relevance:
>         http://www.yubnub.org/ (Social command line for the Web)

It's a multilayer problem, as usual.  One might structure it thusly:

[1] Icon on desktop and/or action mapping.

The user clicks on the icon and activates something.

[2] Activation script, program, or command line.

The activation involves running a script, program, or command line.
Scripts are handled by a shell (which is a program parsing command
lines; there are several).  A program can be run directly using execl()
or execv() but most systems simply use system(), which passes the
command line to a subshell -- /bin/sh -c "command line", or, in C form,
execl("/bin/sh", "sh", "-c", commandLine, (char *) 0); or the far
simpler system(commandLine) -- the former needing a fork() as well.

[3] The program proper.

In many cases the program is the shell, which reads the
script and parses it.  Ultimately, it subinvokes programs
using execl() or execv().  The kernel will get a request,
probably __NR_execve, though its callgate.

[4] The program pages.

The kernel now reads (some of) the program's pages into memory, sets
up a task structure/process structure, and lets it go on its merry way.
The file is expected to be formatted in a certain fashion; I'll refer
interested users to the ELF specifications.

[5] The microprocessor.

The microprocessor sees data coming in -- code instructions -- and
alters its state appropriately.

So where is the "command line", really?  Depends on whom is
interpreting it.  Windows, after all, has shell32.dll,
which is a sort of graphical variant of bash (although a
more appropriate analogue would be nautilus or konqueror).

#191, ewill3@xxxxxxxxxxxxx
Windows Vista.  Because it's time to refresh your hardware.  Trust us.

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index