Skip to content

creating a simple shell using C πŸ‘¨β€πŸ’»

Notifications You must be signed in to change notification settings

bouhsiss/my_shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Minishell !

personal implementation of a simple shell .

what does the project does ?

Your shell should :

_ Display a prompt when waition for a new command.
_ Have a working history.
_ Search and launch the right executable (based on PATH variable or using a relative or an absoluet path).
_ Not interpret unclosed quotes or special characters which are not required by the subject such as '' or ';' .
_ Handle ' (single quote) which should prevent the shell from interpreting the meta-characters in the quoted sequence.
_ Handle " (double quote) which should prevent the shell from interpreting the meta-characters in the quoted sequence except for $ (dollar sign).
_ Implement redirections ( < _ > _ >> _ <<) .
_ Implement infinite pipes.
_ Handle environment variables which should expand to their values by using " $ ".
_ Handle $? which should expand to the exit status value.
_ Handle ctrl-C, ctrl-D and ctrl-\ .
_ Implement thet following builtins :
 - echo with option -n
 - cd with only a relative or absolute path
 - pwd with no options
 - export with no options
 - unset with no options
 - env with no options or arguments
 - exit with no options

why the project is useful ?

_ the aim of this project if to gain experience with some advanced programming techniques like process creationand control, file descriptors, signals and pipes.

Usage.

_ clone the repo, execute make command and then execute ./Minishell and it will display a prompt. then you can have fun with it.

Who contributes to the project ?

Ressources.

https://www.cs.purdue.edu/homes/grr/SystemsProgrammingBook/Book/Chapter5-WritingYourOwnShell.pdf
https://www.rozmichelle.com/pipes-forks-dups/
https://medium.com/swlh/tutorial-to-code-a-simple-shell-in-c-9405b2d3533e
https://www.geeksforgeeks.org/making-linux-shell-c/
https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Simple-Commands
https://mywiki.wooledge.org/BashParser
http://aosabook.org/en/bash.html
https://www.cs.cornell.edu/courses/cs414/2004su/homework/shell/shell.html
https://brennan.io/2015/01/16/write-a-shell-in-c/
https://hackernoon.com/lets-build-a-linux-shell-part-i-bz3n3vg1
https://chrismartine-e.medium.com/creating-your-own-linux-shell-1cbaaae2c41c
https://www.quora.com/How-do-I-create-my-own-shell-in-Linux
https://www.codementor.io/@sandesh87/how-and-why-i-built-a-mini-linux-shell-using-c-1dqk5olxgw
https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
https://pubs.opengroup.org/onlinepubs/7908799/xcu/chap2.html
https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/
https://github.com/moisam/lets-build-a-linux-shell
https://putaindecode.io/articles/maitriser-les-redirections-shell/

About

creating a simple shell using C πŸ‘¨β€πŸ’»

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published