{"id":16319444,"url":"https://github.com/hima890/simple_shell","last_synced_at":"2026-04-14T23:31:31.224Z","repository":{"id":205444011,"uuid":"714251840","full_name":"hima890/simple_shell","owner":"hima890","description":"This project involves creating a simple UNIX command-line interpreter in C that mimics the basic functionalities of the shell (/bin/sh). The shell is designed to meet specific requirements and guidelines outlined below.","archived":false,"fork":false,"pushed_at":"2023-11-16T12:36:37.000Z","size":910,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T22:44:58.120Z","etag":null,"topics":["alx-africa","alx-low-level-programming","bash-script","c","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hima890.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,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-04T11:12:36.000Z","updated_at":"2023-11-26T09:13:31.000Z","dependencies_parsed_at":"2024-11-06T12:57:26.053Z","dependency_job_id":"492a95dc-8d5f-425a-8d89-fb2db08b493d","html_url":"https://github.com/hima890/simple_shell","commit_stats":null,"previous_names":["hima890/simple_shell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsimple_shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsimple_shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsimple_shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hima890%2Fsimple_shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hima890","download_url":"https://codeload.github.com/hima890/simple_shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254044970,"owners_count":22005267,"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":["alx-africa","alx-low-level-programming","bash-script","c","shell-script"],"created_at":"2024-10-10T22:26:59.941Z","updated_at":"2026-04-14T23:31:26.201Z","avatar_url":"https://github.com/hima890.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Shell Project\n\nThis project involves creating a simple UNIX command-line interpreter in C that mimics the basic functionalities of the shell (/bin/sh). The shell is designed to meet specific requirements and guidelines outlined below.\n\n## Table of Contents\n1. [Requirements](#requirements)\n2. [Compilation](#compilation)\n3. [Testing](#testing)\n4. [Tasks](#tasks)\n   - [Task 0: Betty would be proud](#task-0-betty-would-be-proud)\n   - [Task 1: Simple shell 0.1](#task-1-simple-shell-01)\n   - [Task 2: Simple shell 0.2](#task-2-simple-shell-02)\n   - [Task 3: Simple shell 0.3](#task-3-simple-shell-03)\n   - [Task 4: Simple shell 0.4](#task-4-simple-shell-04)\n   - [Task 5: Simple shell 1.0](#task-5-simple-shell-10)\n   - [Task 6: Simple shell 0.1.1](#task-6-simple-shell-011)\n   - [Task 7: Simple shell 0.2.1](#task-7-simple-shell-021)\n   - [Task 8: Simple shell 0.4.1](#task-8-simple-shell-041)\n5. [Authors](#authors)\n6. [Project Structure](#project-structure)\n\n## Requirements\u003ca name=\"requirements\"\u003e\u003c/a\u003e\n\n### General\n- Editors: vi, vim, emacs\n- Compilation on Ubuntu 20.04 LTS using gcc with options -Wall -Werror -Wextra -pedantic -std=gnu89\n- Files must end with a new line\n- Use Betty style, checked with betty-style.pl and betty-doc.pl\n- No memory leaks in the code\n- No more than 5 functions per file\n- Header files should be include guarded\n- Use system calls only when necessary\n\n### Output\n- The shell must produce the same output and error messages as /bin/sh\n\n### GitHub\n- One project repository per group, avoiding duplicate repository names\n- Collaborators should be added to the repository to avoid score deduction\n\n### List of Allowed Functions and System Calls\n- [List of allowed functions and system calls](#list-of-allowed-functions-and-system-calls)\n\n## Compilation\u003ca name=\"compilation\"\u003e\u003c/a\u003e\n\nCompile the shell using the following command:\n\n```bash\ngcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh\n```\n\n## Testing\u003ca name=\"testing\"\u003e\u003c/a\u003e\n\n### Interactive Mode\n\n```bash\n$ ./hsh\n($) /bin/ls\nhsh main.c shell.c\n($)\n($) exit\n$\n```\n\n### Non-Interactive Mode\n\n```bash\n$ echo \"/bin/ls\" | ./hsh\nhsh main.c shell.c test_ls_2\n$\n$ cat test_ls_2\n/bin/ls\n/bin/ls\n$\n$ cat test_ls_2 | ./hsh\nhsh main.c shell.c test_ls_2\nhsh main.c shell.c test_ls_2\n$\n```\n\n## Tasks\u003ca name=\"tasks\"\u003e\u003c/a\u003e\n\n### Task 0: Betty would be proud\u003ca name=\"task-0-betty-would-be-proud\"\u003e\u003c/a\u003e\n- Write a beautiful code that passes the Betty checks\n\n### Task 1: Simple shell 0.1\u003ca name=\"task-1-simple-shell-01\"\u003e\u003c/a\u003e\n- Implement a basic UNIX command line interpreter\n- Display a prompt, wait for the user to input a command, and execute it\n- Handle the \"end of file\" condition (Ctrl+D)\n- Do not use the PATH or implement built-ins\n- Handle errors appropriately\n\n### Task 2: Simple shell 0.2\u003ca name=\"task-2-simple-shell-02\"\u003e\u003c/a\u003e\n- Extend the shell to handle command lines with arguments\n\n### Task 3: Simple shell 0.3\u003ca name=\"task-3-simple-shell-03\"\u003e\u003c/a\u003e\n- Extend the shell to handle the PATH\n- Do not call fork if the command doesn't exist\n\n### Task 4: Simple shell 0.4\u003ca name=\"task-4-simple-shell-04\"\u003e\u003c/a\u003e\n- Implement the exit built-in to exit the shell\n\n### Task 5: Simple shell 1.0\u003ca name=\"task-5-simple-shell-10\"\u003e\u003c/a\u003e\n- Implement the env built-in to print the current environment\n\n### Task 6: Simple shell 0.1.1\u003ca name=\"task-6-simple-shell-011\"\u003e\u003c/a\u003e\n- Write a custom getline function using a buffer to minimize calls to the read system call\n- Use static variables and avoid using the getline function\n\n### Task 7: Simple shell 0.2.1\u003ca name=\"task-7-simple-shell-021\"\u003e\u003c/a\u003e\n- Avoid using strtok in the shell implementation\n\n### Task 8: Simple shell 0.4.1\u003ca name=\"task-8-simple-shell-041\"\u003e\u003c/a\u003e\n- Modify the exit built-in to handle exit status as an integer argument\n\n## Authors\u003ca name=\"authors\"\u003e\u003c/a\u003e\n\n- List all individuals who contributed to the repository in the AUTHORS file. Follow the format used in Docker.\n\n## Project Structure\u003ca name=\"project-structure\"\u003e\u003c/a\u003e\n\n```bash\n/SIMPLE_SHELL\n    ├── README.md\n    ├── AUTHORS\n    ├── .gitignore\n    ├── LICENSE\n    ├── Build/          # Directory for building the main code\n    │   ├── main.c     # Main file\n    │   │── main.h     # Header file for function prototypes\n    │   ├── function_1.c\n    │   ├── function_2.c\n    │   ├── function_3.c\n    │   ├── ...\n    │       \n    ├── utility/\n    │   ├── function1/                 # Directory for function 1\n    │   │   ├── function1.c           # Function 1 implementation\n    │   │   ├── function1.h           # Function 1 header\n    │   │   ├── function1_test.c      # Function 1 test\n    │   │   ├── function1_flowchart.png   # Function 1 flowchart\n    │   │   ├── function1_pseudo.txt  # Function 1 pseudo code\n    │   │\n    │   ├── function2/                 # Directory for function 2\n    │   │   ├── function2.c           # Function 2 implementation\n    │   │   ├── function2.h           # Function 2 header\n    │   │   ├── function2_test.c      # Function 2 test\n    │   │   ├── function2_flowchart.png   # Function 2 flowchart\n    │   │   ├── function2_pseudo.txt  # Function 2 pseudo code\n    │   │   \n    │   ├── ...\n    ├── man/                           # Manual pages for your shell\n    │   ├── shell.1\n    ├── flowcharts/                    # Directory for general flowcharts\n    │   ├── general_flowchart.png      # General flowchart for the shell\n    ├── pseudo_code/                   # Directory for general pseudo code\n    │   ├── general_pseudo.txt         # Pseudo code for the shell\n    ├── concepts/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhima890%2Fsimple_shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhima890%2Fsimple_shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhima890%2Fsimple_shell/lists"}