{"id":19340957,"url":"https://github.com/belovetech/simple_shell","last_synced_at":"2026-04-09T20:33:02.329Z","repository":{"id":111327975,"uuid":"490200248","full_name":"belovetech/simple_shell","owner":"belovetech","description":"A custom Unix shell. The goal is to have a good understanding of how the unix system does command execution architecture, from reading commands via batch or interactive modes to lexical parsing to alias to built-ins to system execution via the kernel, as well as understanding system processes and how to optimise them.","archived":false,"fork":false,"pushed_at":"2022-05-17T10:28:56.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T08:35:51.095Z","etag":null,"topics":["c","cli","linux","prompt","shell","terminal"],"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/belovetech.png","metadata":{"files":{"readme":"README.md","changelog":"change.c","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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-09T08:38:09.000Z","updated_at":"2023-04-09T10:14:09.000Z","dependencies_parsed_at":"2023-05-23T14:00:59.822Z","dependency_job_id":null,"html_url":"https://github.com/belovetech/simple_shell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/belovetech/simple_shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belovetech%2Fsimple_shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belovetech%2Fsimple_shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belovetech%2Fsimple_shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belovetech%2Fsimple_shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belovetech","download_url":"https://codeload.github.com/belovetech/simple_shell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belovetech%2Fsimple_shell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272014519,"owners_count":24858714,"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-08-25T02:00:12.092Z","response_time":1107,"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":["c","cli","linux","prompt","shell","terminal"],"created_at":"2024-11-10T03:28:36.070Z","updated_at":"2026-04-09T20:33:02.276Z","avatar_url":"https://github.com/belovetech.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Simple_shell Project\n\nThis is a project created by [Abeeb Raheem](https://github.com/belovetech) and [Ogunbanjo Nimota Busayo](https://github.com/Nimbusshub). This project recreates the shell which is the Linux command line interpreter in its simplest form. It provides an interface between the user and the kernel and executes programs.\n\nThe \"Simple_shell\" is a program that can be compiled and launched from the command line, where its main function is to execute commands read from the standard input. It contains some of the basic features and functions found in the various shell programs like Kernel commands and builtin commands.\n\n## Quick Start\n\n1. Git clone this respository to your local directory.\n\n       $ git clone https://github.com/belovetech/simple_shell.git\n  \n2. Compile the program.\n\n       $ gcc -Wall -Werror -Wextra -pedantic *.c -o hsh\n       \n3. Now execute the shell.\n      \n       $ ./hsh\n       \n## Builtin Commands\n\nThis shell supports the next builtin commands:\n\n    cd - change directory\n\n    env - list the current environment variables\n\n    exit - exit the shell\n    \n    help - show help for a builtin command\n    \n    pwd - Print the absolute pathname of the current working directory\n    \n    unsetenv - Remove an environment variable\n\n## Delimit and comment commands\n\n\t; -  The semicolon. command separator that allows to run a command on a single line placing the semicolon between\n       each command.\n\t\n\t# - The command number. Allows a word beginning with # and all remaining characters on that line to be ignored.\n\n## Manual\n\nTo see the manual run:\n\n    $ man ./man_1_simple_shell\n    \nExample:\n    \t\n\tman(1)                                  Manual page for Simple_Shell           \t\t\tman(1)                                \n\n\tNAME\n       \tSimple_Shell - Command language interpreter\n\n\tSYNOPSIS\n       \t./hsh\n\n\tDESCRIPTION\n       \tCommand language interpreter that executes commands read from the standard input or from a file.\n\n\tINVOCATION\n       \tAn  interactive  shell is one started without non-option arguments, just running ./hsh. \n\tOtherwise, when is started non-interactively, to run a shell script, for example, the \n\tshell reads and execute the next command echo \"pwd\" | ./hsh.\n\t\n\t\t\t\t\t\t\t.  .  .\n\n\n## Files\n\nBrief description of every file in this repository.\n\t\n| File | Description |\n| ------------- | ------------- |\n| _atoi.c | function that gets sign and numbers of string |\n| _calloc.c | function that allocates memory for an array |\n| _change.c | functions that change the OLDPWD and PWD environment variables |\n| _display_help.c | functions that reads all builtins text files and prints it to POSIX stdout |\n| _envir.c | functions to print the environment variables and create a copy of env |\n| _errors.c | functions with the error message for each builtin |\n| _forky.c | program that creates process and execute |\n| _gethome.c | funtion to get the environment variable HOME |\n| _getline.c | functions to read what the user writes |\n| _iscd.c | functions to change the current directory of the process. |\n| _isexit.c | functions that finds if line input is exit therefore process termination |\n| _ishelp.c | functions to print the help of each builtin |\n| _noargv.c | function to give shell form without filename as input |\n| _realloc.c | function to change the size and copy the content |\n| _realloc2.c | function to change the size and copy the content special case |\n| _signal.c | function to handle SIGINT signal |\n| _str_concat.c | function to create an array using malloc |\n| _strlen.c | function that returns the length of a string |\n| _unsetenv.c | functions to remove an environment variable |\n| _strtoky.c | functions to cut a string into tokens depending of the delimit|\n| _writerr.c | functions to print the error for each builtin |\n| _yesargv.c | function to give shell form with filename as input |\n| checkbin.c | functions to check if commands exist in the path |\n| free_grid.c | function to free a matrix |\n| man_1_simple_shell | manual of simple_shell |\n| parsing.c | functions that create an array of pointers depending of the delimit characters |\n| shell.h | header file with all thr function prototypes |\n| startshell.c | main function that stars the shell (shell skeleton) |\n\n## Examples\nSome examples for builtins after execute ./hsh\n\ncd:\n\n\t#cisfun$ pwd\n\t/home/vagrant/simple_shell\n\t#cisfun$ cd\n\t#cisfun$ pwd\n\t/home/vagrant\n\t#cisfun$\n\t\ncd error:\n\n\t#cisfun$ cd hola\n\t./hsh: 1: cd: can't cd to hola\n\t#cisfun$\n\nexit:\n\n\t#cisfun$ exit 123\n\tvagrant@vagrant-ubuntu-trusty-64:~/simple_shell$ echo $?\n\t123\n\t\nexit error:\n\n\t#cisfun$ exit hola\n\t./hsh: 2: exit: Illegal number: hola\n\t#cisfun$\n\nhelp:\n\n\t#cisfun$ help exit\n\texit: exit [n]\n    \tExit the shell.\n\n    \tExits the shell with a status of N.  If N is omitted, the exit status\n    \tis that of the last command executed.\n\t#cisfun$\n\nhelp error:\n\n\t#cisfun$ help hola\n\t./hsh: 4: help: no help topics match 'hola'. Try 'help help' or 'man -k 'hola' or info 'hola'\n\t#cisfun$\n\n## Authors \n Abeeb Raheem and Ogunbanjo Nimota Busayo\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelovetech%2Fsimple_shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelovetech%2Fsimple_shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelovetech%2Fsimple_shell/lists"}