MENU

Fun & Interesting

Let's build a super simple shell in C

Oceano 9,785 6 months ago
Video Not Working? Fix It Now

CODE (refined a little for github, made nicer) https://github.com/suspectedoceano/imperfect-cell.git Writing Your Own Shell: https://www.cs.purdue.edu/homes/grr/SystemsProgrammingBook/Book/Chapter5-WritingYourOwnShell.pdf - Chapter 5: Writing Your Own Shell (PDF guide). https://github.com/kamalmarhubi/shell-workshop - A step-by-step guide to building a shell in C. https://indradhanush.github.io/blog/writing-a-unix-shell-part-1/ - Blog series: Writing a UNIX shell in C. https://github.com/tokenrove/build-your-own-shell - A GitHub project for building your own shell. https://danishpraka.sh/posts/write-a-shell/ - Tutorial: Writing a shell in C. https://www.gnu.org/software/libc/manual/html_mono/libc.html#Implementing-a-Shell - The GNU C Library: Implementing a Shell. https://aosabook.org/en/v1/bash.html - A deep dive into Bash's architecture. Big Picture (Minishell): https://whimsical.com/minishell-architecture-big-picture-7b9N8PL3qHrddbs977mQ2J - Visual architecture for building a shell. https://m4nnb3ll.medium.com/minishell-building-a-mini-bash-a-42-project-b55a10598218 - Blog: How to build a mini-bash shell. Cool Tools: https://explainshell.com/ - Tool to match command-line arguments to their help text. MIT Shell Resources: https://youtube.com/playlist?list=PLbtzT1TYeoMhF4hcpEiCsOeN13zqrzBJq&si=o2z1PYgmMfqUUs5u - MIT Playlist: Shell code explained. typedef struct 🔗s_links🔗 { 🇮🇹🍕🍝My Italian channel - https://www.youtube.com/channel/UCgq3a4_mJ0YCwzWu4tW90kQ 👨🏻‍🏫 FREE Udemy course for total beginners, pre_knowledge before C (Overflow, 2’s complement, BASH, VIM…) - https://www.udemy.com/course/oceano_0b0001/?referralCode=C218698D6A3E3D16EEEB 📑 Notion community page (FREE coding sources) - https://suspectedoceano.notion.site/Ocean-s-42-fd42e3ed0f6049ca98fb3b290b84d4d0?pvs=4 🧾 Medium (code articles) - https://medium.com/@jalal92 📲 Telegram group - https://t.me/suspectedoceanO 💻 GitHub - https://github.com/suspectedoceano 🛸 Discord - https://discord.gg/hkUvRaDcEP 🐦 Twitter - https://twitter.com/SuspectedOceano ☕️ ChannelSupport - https://www.buymeacoffee.com/suspectedoceano (if you read this, you are already supporting, TY!) } 🔗t_links🔗 Timeline 00:00:00 Intro 00:05:40 REPL, reading a line from stdin 00:19:30 REPL, strtok to get tokens 00:30:08 REPL, builtin 00:40:35 fork, execvp, wait

Comment