I want to know when we enter a command in a shell then how does the computer recognize that command?
Does it match that command with something already stored in files?
-
$\begingroup$ How in general do you go about getting insights? When turning to a community, assume there is guidance. Which computer science / programming Stack Exchange sites do I post on? offers help in picking a site. $\endgroup$– greybeardMay 19, 2021 at 9:49
1 Answer
Text committed to be interpreted as a command is assumed to be a phrase (to avoid any term with a special meaning) in the command language of the system (here: Shell
(and "layers" beneath)) that shall assign meaning to it (and cause appropriate effects).
A command language is one instance of a formal language.
Many command languages, including shell allow programming: their languages are programming languages.
Formal languages in general, programming languages, interpreters and compilers are notable topics of computer science as is operating system principles.