Skip to main content
added 213 characters in body
Source Link
X.LINK
  • 1.4k
  • 1
  • 11
  • 21

ItHow the insides works if a command exists: It's just usesuseing plain regular standard input to store the commands -either from script or not- and its arguments, then parses them so they can be sent to a system call like execve that will executefind the command in the system then run it:

http://man7.org/linux/man-pages/man2/execve.2.html

Besides, like Time4Tea said, there's some builtin commands that are exclusive to the shell you're running. exit is one of them.

 

As a rule of thumb, if there's something about Linux you can't know by any regular means, just go for its source code.

It just uses plain regular standard input to store the commands -either from script or not- and its arguments, then parses them so they can be sent to a system call like execve that will execute the command:

http://man7.org/linux/man-pages/man2/execve.2.html

As a rule of thumb, if there's something about Linux you can't know by any regular means, just go for its source code.

How the insides works if a command exists: It's just useing plain regular standard input to store the commands -either from script or not- and its arguments, then parses them so they can be sent to a system call like execve that will find the command in the system then run it:

http://man7.org/linux/man-pages/man2/execve.2.html

Besides, like Time4Tea said, there's some builtin commands that are exclusive to the shell you're running. exit is one of them.

 

As a rule of thumb, if there's something about Linux you can't know by any regular means, just go for its source code.

Source Link
X.LINK
  • 1.4k
  • 1
  • 11
  • 21

It just uses plain regular standard input to store the commands -either from script or not- and its arguments, then parses them so they can be sent to a system call like execve that will execute the command:

http://man7.org/linux/man-pages/man2/execve.2.html

As a rule of thumb, if there's something about Linux you can't know by any regular means, just go for its source code.