Re:GNU/Linux shell related internals
by usr1106 on Sunday December 18, 2022 @08:18AM
(#34037398)
The headline seems weird. The list of file descriptors etc etc does not sound like shell internals, hut like Unix operating system concepts.
[ Parent
| on HN ]
It more likes "How shell invokes a command", I have a POSIX programming course in university, one homework is to implement a simple shell, you need to handle the FDs, Pipes, environment variables by POSIX API as the article explains.
Re:GNU/Linux shell related internals
by supriyo-biswas on Sunday December 18, 2022 @08:27AM
(#34037446)
If you're after how the shell parses commands, the EBNF grammar in the POSIX specification is a good start:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
Unfortunately, there's not much to a shell other than it's parsing capabilities.
It is unfortunate that an LR-parsed language was chosen.
https://archive.fosdem.org/2018/schedule/event/code_parsing_...