{"id":23402841,"url":"https://github.com/hamaarour/minishell","last_synced_at":"2026-05-02T04:33:45.543Z","repository":{"id":153547666,"uuid":"624194184","full_name":"Hamaarour/minishell","owner":"Hamaarour","description":"This project is about creating a simple shell - essentially, my own little bash. Through this project, I've learned a lot about processes and file descriptors.","archived":false,"fork":false,"pushed_at":"2023-06-06T19:39:58.000Z","size":5602,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T17:38:36.730Z","etag":null,"topics":["1337cursus","1337school","bash","c","minishell42"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"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/Hamaarour.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}},"created_at":"2023-04-06T00:16:02.000Z","updated_at":"2024-12-06T19:45:08.000Z","dependencies_parsed_at":"2024-12-22T12:37:43.075Z","dependency_job_id":null,"html_url":"https://github.com/Hamaarour/minishell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2Fminishell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2Fminishell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2Fminishell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hamaarour%2Fminishell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hamaarour","download_url":"https://codeload.github.com/Hamaarour/minishell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247936528,"owners_count":21021055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["1337cursus","1337school","bash","c","minishell42"],"created_at":"2024-12-22T12:37:39.477Z","updated_at":"2026-05-02T04:33:40.486Z","avatar_url":"https://github.com/Hamaarour.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\" \u003e\n\u003cimg src =\"https://github.com/Hamaarour/minishell/blob/main/pictures/Demo.png\"  width='900px' height='600px'\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src =\"https://github.com/Hamaarour/minishell/blob/main/pictures/team_p.png\"\u003e\n\u003c/p\u003e\n\nThis project is about creating a simple shell\n\nMiniShell will introduce you to the world of shells, which provide a convenient text interface to interact with your system. Shells might seem very easy to understand but have very specific and defined behaviour in almost every single case, most of which will need to be handled properly\n\n## The Challenge\nThis was probably the biggest project I've done so far, as well as the first one I did as a group.  The goal was to create a mini version of bash, I say mini but it was still a huge project.  We had to learn how bash takes arguments, parses them, and executes them. We had to incorporate the following features:\n- Display a promt while waiting for a new commmand.\n- Have a working history.\n- Find and launch executables (using the `PATH` variable or an absolute path).\n- Handle `'` (single) and `\"` (double) **quotes** like in bash.\n- Implement **redirections** such as:\n  - `\u003c` redirect input.\n  - `\u003e` redirect output.\n  - `\u003c\u003c` heredoc (doesn't affect history).\n  - `\u003e\u003e` redirect output in append mode.\n- Implement `|` (**pipes**).\n- Handle **environment variables**.\n- Handle `$?`.\n- `ctrl-C`, `ctrl-D`, and `ctrl-\\` should behave like in bash.\n- Recreate the following **builtins**:\n  - `echo` with option `-n`.\n  - `cd` with only a relative or absolute path.\n  - `pwd` (no flags).\n  - `export` (no flags).\n  - `unset` (no flags).\n  - `env` (no flags or arguments).\n  - `exit` (no flags).\n## Installation\n### Clone the repository:\n``` \ngit clone https://github.com/Hamaarour/minishell.git\ncd minishell\nmake\n```\n### Run Minishell\n```\n./minishell\n```\n\n### Some commands to try:\n\nAs this project is made to mimic bash, you can try any commands you normally would try in bash.\n\nIf you really can't think of anything try some of the following.  You do have to enter each line separately as the program doesn't handle new lines.\n```\nls -la | grep a | tr 'a-z' 'A-Z'\n```\n\n```\ncat \u003c\u003c EOF \u003e file\ncat file\nrm file\n```\n\n```\nls | rev \u003e file\ncat file\nrev file | cat\nrm file\n```\n\n*to exit the program:*\n```\nexit\nWe didn't have to implement \u0026\u0026 and ||, or wildcards, as well as any special symbols that weren't specifically asked for.  We were also told that when in doubt, take bash as a reference.  This sometimes led to discussions on wether or not we had to implement something, the result of which was usually\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamaarour%2Fminishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamaarour%2Fminishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamaarour%2Fminishell/lists"}