{"id":50340429,"url":"https://github.com/triangle-motelti/mini-bash","last_synced_at":"2026-05-29T16:30:52.152Z","repository":{"id":317751952,"uuid":"1003112602","full_name":"triangle-motelti/mini-bash","owner":"triangle-motelti","description":"a simple Unix shell supporting commands, redirections, pipes, built-ins, env vars, and signal handling in C.","archived":false,"fork":false,"pushed_at":"2025-10-27T01:08:56.000Z","size":6437,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T03:09:34.857Z","etag":null,"topics":["42born2code","42projects","42school","bash","c-language-project","c-programming","collaboration","implementation-from-scratch","implementation-of-algorithms","low-level","low-level-programming","makefile","shell","system-calls","system-programming","team-project","team-repo","unix","unix-shell"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/triangle-motelti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-16T16:34:52.000Z","updated_at":"2025-10-27T01:08:59.000Z","dependencies_parsed_at":"2025-10-02T21:18:20.956Z","dependency_job_id":"752904a8-c781-439a-a48c-6690f0617c25","html_url":"https://github.com/triangle-motelti/mini-bash","commit_stats":null,"previous_names":["triangle-motelti/mini-bash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/triangle-motelti/mini-bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triangle-motelti%2Fmini-bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triangle-motelti%2Fmini-bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triangle-motelti%2Fmini-bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triangle-motelti%2Fmini-bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triangle-motelti","download_url":"https://codeload.github.com/triangle-motelti/mini-bash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triangle-motelti%2Fmini-bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33662205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42born2code","42projects","42school","bash","c-language-project","c-programming","collaboration","implementation-from-scratch","implementation-of-algorithms","low-level","low-level-programming","makefile","shell","system-calls","system-programming","team-project","team-repo","unix","unix-shell"],"created_at":"2026-05-29T16:30:51.006Z","updated_at":"2026-05-29T16:30:52.141Z","avatar_url":"https://github.com/triangle-motelti.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini-bash\n\nmini-bash is a simple Unix shell designed as a learning and educational project. It supports a variety of basic shell functionalities including command execution, redirections, pipes, built-in commands, environment variable handling, and signal management. This project is primarily written in C, with a small portion of Makefile code for building the project.\n\n![Alt text](mini-bash.png)\n\n## Features\n\n- **Command Execution:** mini-bash can execute built-in commands as well as external binaries available on the system.\n- **Redirections:** The shell supports redirection of input and output, enabling users to run commands with files as input or output.\n- **Pipes:** Users can chain commands together using pipes, passing the output of one command as the input to the next.\n- **Built-ins:** The shell includes common built-in commands which are implemented directly in the program.\n- **Environment Variables:** mini-bash reads and manages environment variables, which can be used within the shell or passed to executed programs.\n- **Signal Handling:** The shell appropriately handles signals, making it robust against interruptions and ensuring smooth execution of background and foreground processes.\n\n## How It Works\n\n1. **Initialization:** When mini-bash starts, it sets up the environment and initializes necessary variables and signal handlers.\n2. **Input Parsing:** It reads user input and parses the command line to identify commands, arguments, and special symbols such as redirection operators or pipes.\n3. **Command Execution:** Depending on whether the command is built-in or external, mini-bash either executes the command directly or spawns a child process to run an external binary.\n4. **Redirection \u0026 Pipes:** The shell processes redirections and pipes by manipulating file descriptors, ensuring that data flows correctly between commands.\n5. **Signal Handling:** Special attention is given to signal management, so that signals like SIGINT (Ctrl+C) are correctly interpreted, allowing the shell to maintain stable operation.\n\n## Building and Running\n\nA Makefile is provided for easy compilation. To build the project, simply run:\n\n```bash\nmake\n```\n\nThen, launch the shell with:\n\n```bash\n./mini-bash\n```\n\n## Project Structure\n\n- **C Source Files:** The bulk of the project is written in C, implementing the core shell functionalities.\n- **Makefile:** Contains build instructions for compiling the project.\n\n## Conclusion\n\nmini-bash is a compact and efficient implementation of a Unix shell. It serves as an excellent example of system programming in C and provides a hands-on approach to understanding shell mechanics.\n\nHappy hacking!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriangle-motelti%2Fmini-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriangle-motelti%2Fmini-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriangle-motelti%2Fmini-bash/lists"}