Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nihadamirov/holbertonschool-shell

Implemented a custom shell application as part of educational coursework
https://github.com/nihadamirov/holbertonschool-shell

kernel linux shell-script simple-shell

Last synced: 16 days ago
JSON representation

Implemented a custom shell application as part of educational coursework

Awesome Lists containing this project

README

        

```

_____ _ _ _____ ____ _ _____ _____ ____ ___ _____
|_ _| | | | ____| / ___| / \|_ _| ____/ ___| / _ \| ___|
| | | |_| | _| | | _ / _ \ | | | _| \___ \ | | | | |_
| | | _ | |___ | |_| |/ ___ \| | | |___ ___) | | |_| | _|
|_| |_| |_|_____| \____/_/ \_\_| |_____|____/ \___/|_|

____ _ _ _____ _ _
/ ___|| | | | ____| | | |
\___ \| |_| | _| | | | |
___) | _ | |___| |___| |___
|____/|_| |_|_____|_____|_____|

```

## The Holberton Shell
The gates of shell is a Holberton School project in the first trimester, helps student to understand the advanced
concepts behind the shell program include process, system call, bit manipulation, file managment, error handling ...

### General

* Who designed and implemented the original Unix operating system
* Who wrote the first version of the UNIX shell
* Who invented the B programming language (the direct predecessor to the C programming language)
* Who is Ken Thompson
* How does a shell work
* What is a pid and a ppid
* How to manipulate the environment of the current process
* What is the difference between a function and a system call
* How to create processes
* What are the three prototypes of `main`
* How does the shell use the `PATH` to find the programs
* How to execute another program with the `execve` system call
* How to suspend the execution of a process until one of its children terminates
* What is `EOF` / “end-of-file”?

## Getting HSH
In order to install the shell and get benefits of it's features you need to clone the current project, and compile it.
You need to make sure that this shell tested and garantees work based on `gcc-4.8` and the `C90` standard.

## Features
* Display a prompt and wait for the user to type a command. A command line always ends with a new line.
* If an executable cannot be found, print an error message and display the prompt again.
* Handle errors.
* Hndling the “end of file” condition (Ctrl+D)
* Hanling the command line with arguments
* Handle the PATH
* Support the exit features and the exit status
* Handle the Ctrl-C to not terminate the shell
* Handling the command seperator `;`
* Handling `&&` and `||` logical operators
* Handle variable replacements `$?` and `$$`
* Handle the comments `#`
* Support the history feature
* Support the file input

## Builtins
* The exit builtin `exit [STATUS]`
* The change directory `cd [DIRECTORY] | [OPTION]`
* Display the environnment variables `env`
* Initialize a new environnment variables or created if not match `setenv [VARIABLE] [VALUE]`
* Remove an environnment variable `unsetenv [VARIABLE]`
* Support the aliases `alias [name [='value'] ...]`
* Display help `help [BUILTIN]`
* Display history `history`

## Authors
Nihad Amirov - Software Developer [Linkedin](https://www.linkedin.com/in/nihadamirov) - [Github](https://github.com/nihadamirov)