Skip to content

This is the "minishell" project of the 42 School core curriculum. The goal was to create a simple shell on the basis of bash in C.

License

Notifications You must be signed in to change notification settings

lschrafstetter/42_minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

This is the minishell project of the 42 School core curriculum (mini bash clone).

image

How to use it (Linux or macOS):

  • clone the repo
  • if the readline package is not installed: sudo apt-get install libreadline6 libreadline6-dev
  • "make" via the Makefile
  • ./minishell

The task was to create a mini bash clone with the following features:

  • working history
  • launch an executable (relative/absolute path or via PATH variable)
  • handles ' " ' and ' ' '
  • redirections ("<", "<<", ">", ">>")
  • pipes (' | ')
  • handles environment variables
  • handles the command "&?"
  • handles SIGINT and SIGQUIT
  • the following builtins:
    • echo with option -n
    • cd
    • pwd (no options)
    • export (no options)
    • unset (no options)
    • env (no options or arguments)
    • exit (no options)

Disclaimer: This project was created as a school project with the strict 42 "Norminette" norm, including:

  • variable declarations at the beginning of the file
  • no declaration and initialization on the same line
  • only while loops allowed
  • only 25 lines per function
  • only 5 functions per .c file
  • no comments inside of functions
  • more minor things...

About

This is the "minishell" project of the 42 School core curriculum. The goal was to create a simple shell on the basis of bash in C.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published