{"id":19675479,"url":"https://github.com/kuninoto/42_minishell","last_synced_at":"2025-05-05T23:16:07.423Z","repository":{"id":157766200,"uuid":"576481511","full_name":"Kuninoto/42_minishell","owner":"Kuninoto","description":"Small implementation of a shell replicating bash, truly hell","archived":false,"fork":false,"pushed_at":"2025-03-29T02:10:04.000Z","size":427,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T23:16:01.331Z","etag":null,"topics":["42","42-minishell","42-school","42born2code","42cursus","42minishell","42porto","42portugal","42projects","42school","ecole42","minishell","minishell-42","minishell42","school42","unix"],"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/Kuninoto.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":"2022-12-10T01:25:12.000Z","updated_at":"2025-03-29T02:10:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"465eea51-3ff9-4cbb-8c26-c80dde1115be","html_url":"https://github.com/Kuninoto/42_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/Kuninoto%2F42_minishell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kuninoto%2F42_minishell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kuninoto%2F42_minishell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kuninoto%2F42_minishell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kuninoto","download_url":"https://codeload.github.com/Kuninoto/42_minishell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590635,"owners_count":21772941,"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":["42","42-minishell","42-school","42born2code","42cursus","42minishell","42porto","42portugal","42projects","42school","ecole42","minishell","minishell-42","minishell42","school42","unix"],"created_at":"2024-11-11T17:24:22.560Z","updated_at":"2025-05-05T23:16:07.411Z","avatar_url":"https://github.com/Kuninoto.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minishell (42Porto - 42Cursus)  \n\n#### Project done in collaboration with [Rodrigo Ramos](https://github.com/ramos21rodrigo)  \n\n### Demonstration  \n\n![](./extras/showcase.gif)\n\n## Description  \n\nBasic shell that replicates core functionalities of [bash](https://www.gnu.org/software/bash/).\n\n## Features\n\n- Handle command execution from relative, absolute and paths taken from `PATH`;\n- Handle `$?`;\n- Handle SIGINT and SIGQUIT signals; \n- Environment variables;\n- Command history;\n- Quotes (both single and double) support;\n- I/O Redirections support;\n- Pipe support;\n- Builtin commands: `echo`, `cd`, `pwd`, `export`, `unset`, `env` and `exit`\n\n## Grade: 101/100  \n\n### Installing and running the project  \n1- Install dependencies:  \n\n\tsudo apt-get install make libreadline-dev\n2- Clone this repository:  \n\n\tgit clone https://github.com/Kuninoto/42_minishell minishell\n3- Navigate to the project's folder\n\n\tcd minishell\n4- Compile and wipe the object files that you won't need anymore  \n\n\tmake \u0026\u0026 make clean\n5- Run minishell\n\n\t./minishell\n\n#### Makefile available targets  \n`make` or `make all` - compiles `minishell`  \n`make clean` - wipes all object files  \n`make fclean` - deletes `minishell` and all object files  \n`make re` - `fclean` + `all`  \n\n## Useful links  \nUnderstanding Bash/Shell behavior and related functions:  \n[Writing a UNIX shell part 1](https://indradhanush.github.io/blog/writing-a-unix-shell-part-1/)  \n[Writing a UNIX shell part 2](https://indradhanush.github.io/blog/writing-a-unix-shell-part-2/)  \n[Writing a UNIX shell part 3](https://indradhanush.github.io/blog/writing-a-unix-shell-part-3/)  \n[GNU documentation about redirections](https://www.gnu.org/software/bash/manual/html_node/Redirections.html)  \n[Shell Program Explained](https://www.youtube.com/watch?v=ubt-UjcQUYg)  \n[Shell Code - More Detail](https://www.youtube.com/watch?v=ZjzMdsTWF0U)  \n[EnthusiastiCon - Stefanie Schirmer “OMG building a shell in 10 minutes”](https://www.youtube.com/watch?v=k6TTj4C0LF0)  \n[execve()](https://www.tutorialspoint.com/unix_system_calls/execve.htm)  \n[Signals and traps in UNIX](https://www.geeksforgeeks.org/signals-and-traps-in-unix/)  \n[UNIX signals and traps](https://www.tutorialspoint.com/unix/unix-signals-traps.htm)  \n[List of terminal generated signals (eg Ctrl-C -\u003e SIGINT)](https://unix.stackexchange.com/questions/362559/list-of-terminal-generated-signals-eg-ctrl-c-sigint#362566)  \n[What's a relative path?](https://www.computerhope.com/jargon/r/relapath.htm)  \n[What's an absolute path?](https://www.techopedia.com/definition/5817/absolute-path)  \n[TERM environment variable (UNIX)](https://www.ibm.com/docs/en/informix-servers/12.10?topic=products-term-environment-variable-unix)  \n[What is an environment variable?](https://kinsta.com/knowledgebase/what-is-an-environment-variable/)  \n[TERM environment variable not set](https://linuxconfig.org/term-environment-variable-not-set-solution)  \n[Writing your own shell](https://www.cs.purdue.edu/homes/grr/SystemsProgrammingBook/Book/Chapter5-WritingYourOwnShell.pdf)  \n[Tiny Shell - case study](http://www.cems.uwe.ac.uk/~irjohnso/coursenotes/lrc/system/shell/index.html)  \n[Pipes, Forks, \u0026 Dups: Understanding Command Execution and Input/Output Data Flow](https://www.rozmichelle.com/pipes-forks-dups/)  \n[Open-source alike project](https://github.com/Swoorup/mysh)  \n\nParsing:  \n[Parsing Explained](https://youtu.be/bxpc9Pp5pZM)  \n[Parsing](https://youtu.be/r6vNthpQtSI)  \n[Functional Parsing](https://www.youtube.com/watch?v=dDtZLm7HIJs)  \n[Recursive Descent Parsing](https://www.youtube.com/watch?v=SToUyjAsaFk)  \n[Open-source alike project](https://github.com/mit-pdos/xv6-public/blob/master/sh.c)  \n[Parsing reference](https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html)  \n\nAbstract Syntax Tree (AST):  \n[Abstract syntax tree on Wikipedia](https://en.wikipedia.org/wiki/Abstract_syntax_tree)  \n[How to construct an abstract syntax tree](https://stackoverflow.com/questions/1721553/how-to-construct-an-abstract-syntax-tree)  \n[What is an AST?](https://www.twilio.com/blog/abstract-syntax-trees)  \n\n## Disclaimer\n\u003e At [42School](https://en.wikipedia.org/wiki/42_(school)), almost every project must be written in accordance to the \"Norm\", the schools' coding standard. As a result, the implementation of certain parts may appear strange and for sure had room for improvement.\n\n---\nMade by Nuno Carvalho (Kuninoto) | nnuno-ca@student.42porto.com  \n\u003cdiv id=\"badge\"\u003e \u003ca href=\"https://www.linkedin.com/in/nuno-carvalho-218822247\"/\u003e \u003cimg src=\"https://img.shields.io/badge/LinkedIn-blue?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" alt=\"LinkedIn Badge\"/\u003e\u0026nbsp;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuninoto%2F42_minishell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuninoto%2F42_minishell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuninoto%2F42_minishell/lists"}