A Bourne-style shell built from scratch in 35 minutes [video]
11–20 of 71 posts
Re: A Bourne-style shell built from scratch in 35 minutes [video]
#12There is more to writing a shell than simply reading commands and executing them after fork()ing. TTY handling must be done right¹ and interrupt and signal handling is rather tricky to get right as well². (Not to mention, of course, that a Unix shell is very cumbersome to use without pipes and redirection. EDIT: Pipes are implemented, but not redirection?) 1. http://www.linusakesson.net/programming/tty/ 2. https://ww…
If it was insufficiently pedagogical, or failed to give people the impression that shells are just software and They Can Do It Too, then I would understand the critique more, as those are clearly the goals.
Re: A Bourne-style shell built from scratch in 35 minutes [video]
#13On this note, I need to build my own Terminal multiplexer - does anyone have a favorite primer of theirs for all the escape codes? Not only do I need to use them myself, but I need to handle them of child processes to restrict term sizes etc. I can Google like ya'll - I'm just asking if there are any favorite resources :) Thanks
There are no such things as “ the ” escape codes. Any terminal could have any codes. You would have to look at the TERM environment variable and use codes appropriate for that terminal. There are, of course, libraries to do this for you, such as terminfo and ncurses. But never output raw escape codes yourself - all the world is not a VT100 or Linux terminal.
Re: A Bourne-style shell built from scratch in 35 minutes [video]
#14Was expecting more guns, car chases, exotic city backgrounds, and slightly-above-average women from the new Bourne shell. Turns out it's just a command line interpreter. Two stars.
Re: A Bourne-style shell built from scratch in 35 minutes [video]
#15On this note, I need to build my own Terminal multiplexer - does anyone have a favorite primer of theirs for all the escape codes? Not only do I need to use them myself, but I need to handle them of child processes to restrict term sizes etc. I can Google like ya'll - I'm just asking if there are any favorite resources :) Thanks
Re: A Bourne-style shell built from scratch in 35 minutes [video]
#16Then 35 weeks to get POSIX job control, pipes, handling signals and whatnot. 35 years to find the last bug.
Re: A Bourne-style shell built from scratch in 35 minutes [video]
#17On this note, I need to build my own Terminal multiplexer - does anyone have a favorite primer of theirs for all the escape codes? Not only do I need to use them myself, but I need to handle them of child processes to restrict term sizes etc. I can Google like ya'll - I'm just asking if there are any favorite resources :) Thanks
Re: A Bourne-style shell built from scratch in 35 minutes [video]
#18Re: A Bourne-style shell built from scratch in 35 minutes [video]
#19Re: A Bourne-style shell built from scratch in 35 minutes [video]
#20Was expecting more guns, car chases, exotic city backgrounds, and slightly-above-average women from the new Bourne shell. Turns out it's just a command line interpreter. Two stars.
Funny, but the shell's namesake is pretty badass himself https://en.wikipedia.org/wiki/Stephen_R._Bourne
— Eric Allman