I'm a newbie to process and thread management. My Shell should understand PATH
environment variable. It can be set and modified. It runs in two ways -interactive & batch mode. Shell is capable of taking more than one job like ls;ps;wc file;cal. I want to get my hands dirty on signals too. So I should handle ^K , ^c as well.
I know I will have to use execs, forks and pipes but just can't get started.
C shell's scripting syntax is modeled after the C language in some aspects. Small programs can be created by writing scripts using the C shell syntax. The Bourne shell is also an option to create Unix scripts but if you are reading this book you probably decided the C shell fits your requirements better.
All the unix shells are open-source - so a good place to start may be to read the code.
If you're looking for a good starter article on the subject try Writing Your Own Shell from the Linux Gazette.
Another good starting point is to take a look at the source code of mini-shell just because its one of the smallest to get your head round.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With