Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!metro!macuni!news From: news@macuni.mqcc.mq.oz (USENET News System) Newsgroups: comp.unix.wizards Subject: Re: How to write a Unix Shell? Keywords: ksh, sh, csh, bash Message-ID: <438@macuni.mqcc.mq.oz> Date: 28 Aug 90 00:24:47 GMT References: <6909@ozdaltx.UUCP> Organization: Macquarie University, School of Mathematics, Physics, Computing and Electronics Lines: 34 In article <6909@ozdaltx.UUCP> toma@ozdaltx.UUCP (Tom Armistead) writes: > >Does anyone know where I can find any information on how to write a Unix >command shell (like sh or ksh)? There isn't any really good information around on this sort of stuff (I mean specifically for writing shells), not that I can find anyway. You can find interesting concepts in "Advanced UNIX programming" by Marc Rochind. There is a whole section in there on how to write a simple UNIX shell. >I have access to ksh and bash source, but don't want to spend the rest of >my life trying to figure those out. Yup! >I would like to find out how the environment space is handled. What, if >anything, needs to be done to siatisfy the kernel and/or the C library >functions like getenv(), putenv() and popen(). And probally a few million >other things that I haven't thought of. The best thing is to go through the UNIX manuals (man 2 intro etc.) and just find out what you can. I have had a long interest in UNIX shells, and have implemented some simple ones myself. What sort of a shell are you trying to put together? Regards, Martin. Martin Foord | AARNET: martin@macadam.mqcs.mq.oz.au Systems Administrator | UUCP: ...!uunet!macadam.mqcs.mq.oz.au!martin Macquarie University | Computing Science Australia | (02) 805 8940