Liste des Groupes | Revenir à col misc |
The Natural Philosopher <tnp@invalid.invalid> wrote:Thanks. I had finally figured out that without the shell there *is* no command line.On 04/05/2025 14:41, Richard Kettlewell wrote:The shell (bash/csh/tcsh/ksh/ash/etc.) reads a line of text from youI mean you can trace the transmission of the command line from parent to>
child process through the startup. There’s no splitting in there, it’s
an array of strings from top to bottom.
But the command line is not an array of strings... any more than this
line of text is. That's what I don't understand. It's a single string
when you type it in and press return/enter.
The shell performs the "splitting" from a "line of text" intoThe splitting on spaces (and handling of quotes etc) happens in the>
shell.
An array by definition is already split. On what basis is it split?
individual strings.
All of the kernel, C the language, and libc the library routines
handles the "command line" values as an array of strings.
The shell that reads in that line from you is what splits it up to make
it compatible with the kernel/C/libc interface.
Or, said another way, the shell (bash/csh/etc) is the "translator" from
"single line of text" into "array of strings" that the rest of the
interface expects to receive.
Les messages affichés proviennent d'usenet.