{"id":19599212,"url":"https://github.com/42yerevanprojects/minishell","last_synced_at":"2025-09-11T13:05:18.019Z","repository":{"id":45188163,"uuid":"412881653","full_name":"42YerevanProjects/minishell","owner":"42YerevanProjects","description":"As beautiful as a shell. Implementation of the 42 project minishell","archived":false,"fork":false,"pushed_at":"2022-01-09T08:51:10.000Z","size":183,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T14:51:23.864Z","etag":null,"topics":["42born2code","42school","bash","c","execution","parsing","processes","shell","signal-handling"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/42YerevanProjects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-02T18:34:44.000Z","updated_at":"2023-09-11T20:56:58.000Z","dependencies_parsed_at":"2022-09-06T00:01:39.451Z","dependency_job_id":null,"html_url":"https://github.com/42YerevanProjects/minishell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/42YerevanProjects/minishell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42YerevanProjects%2Fminishell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42YerevanProjects%2Fminishell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42YerevanProjects%2Fminishell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42YerevanProjects%2Fminishell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/42YerevanProjects","download_url":"https://codeload.github.com/42YerevanProjects/minishell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/42YerevanProjects%2Fminishell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274640910,"owners_count":25322843,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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","42school","bash","c","execution","parsing","processes","shell","signal-handling"],"created_at":"2024-11-11T09:09:24.770Z","updated_at":"2025-09-11T13:05:17.968Z","avatar_url":"https://github.com/42YerevanProjects.png","language":"C","readme":"### 42 Minishell\n\nThe existence of shells is linked to the very existence of IT. At the time, all coders agreed that communicating with\na computer using aligned 1/0 switches was seriously irritating. It was only logical that they came up with the idea \nto communicate with a computer using interactive lines of commands in a language somewhat close to english. The \nobjective of this project is to create a simple shell in C.\n\nThis project is a 42 school's duo project. The core achievement of the project was that it helped us  get to the core\nof the Unix system and explore an important part of this system’s API: process creation, input parsing and \nsynchronisation.\n\n## Introduction to the project\n\nThe behavior of the minishell is heavily based on the bash behavior. For every point, take [bash](https://www.gnu.org/software/bash/manual/bash.pdf) as a reference. It is implemented with the rules described below.\n\n__implement the following builtins:__\n\n- `echo` and the `-n` option\n- `cd` only with an absolute or relative path\n- `pwd` without any options\n- `export` without any options\n- `unset` without any options\n- `env` without any options or arguments\n- `exit` without any options\n\n__The function to be implemented in the project__\n\n- Display a prompt while waiting for a new order.\n-  Find and launch the correct executable (based on a PATH environment variable\nor using an absolute path).\n- `\u003c\u003c` in the command line must open a heredoc and take input like bash.\n- `’`and `\"` must work as in bash, except multiline.\n- The `\u003c`,`\u003e` and `\u003e\u003e` redirectionss must work as in bash, except for\naggregations of fd.\n-  Pipes redirections `|`.\n- The environment variables ($ followed by characters) must work.\n- `$?` variable.\n- `ctrl-C`, `ctrl-D` and `ctrl- \\` signals should have the same behavior.\n\n## Implementation and organization of the project\n\n\u003e ⚠️ **Warning**: Don't copy/paste code you don't understand: it's bad for you, and for the school.\n\nThe current project is built for Linux. If you want to run it on Mac, please change the Makefile accordingly \nby specifying the place of the needed libraries (for example readline).\n\nThe project consists of several folders that are presented below.\n\n__includes:__\n\tThe following folder contains the minishell.h file, which consists of the includes of external libraries, function\n\theaders created in this project and the declaration of the structs used in the project.\n\n__libft:__\n\tThis folder represents the library created during the Libft 42 project. It contains many useful functions that\n\thelped during the project.\n\n__srcs:__\n\tThis folder contains the main functions of the project.\n\n\t`main.c:` The main function of the project.\n\t`signal.c:` The functions used for signal handling.\n\t`execute.c:` The file that contains the ft_exec function. \n\t`parse_and_execute.c:` The file that is responsible for parsing the line and executing the commands.\n\t\n\t`parse:` The folder containing all the files related to parsing.\n\t`env:` The folder containig util functions workig with environment variables. \n\t`builtins:` The folder containing the implementations of the builtin commands.\n\t`heredoc`: The folder containing the function related to heredoc and its execution\n\n__utils:__\n\tThis folder contains the util functions used by this project.\n\n## Installation\n\nTo use this project you need to clone this repository, by running the following command\n\n```\ngit clone https://github.com/42YerevanProjects/42_minishell.git\n```\nThen you should go to the cloned repo and run the make command\n\n```\ncd 42_minishell\nmake\n```\nAfter that you will see the executable minishell. Lastly you should run the executable\n\n```\n./minishell\n```\nYou will be provided with a prompt and can use it as a shell.\n\n## Credits\n\nWe got help from a 42 school student [aisraely](https://github.com/Mampacuk). He gave us a lot of info about the project and code organization.\nThe people who completed the project are 42 studens [shovsepy](https://github.com/Sargis-Hovsepyan) and [abalaban](https://github.com/ArpyBalaban).\n\n## Additional info\n\nIn order to understand the project requirements well you can read the subject file of the project. Moreover, if you\ncopy the code from this repository then you have to specify the author of the code and referrence this repository. If\nyou find any bugs in the code please write to the issues.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F42yerevanprojects%2Fminishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F42yerevanprojects%2Fminishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F42yerevanprojects%2Fminishell/lists"}