Skip to content

pabloocg/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License


Minishell

As beautiful as a shell
Explore the docs »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

The objective of this project is create a simple shell. Yes, your own little bash or zsh. You will learn a lot about processes and file descriptors.


Madatory Part

Program name minishell
Makefile Yes
External functs. printf, malloc, free, write, open, read, close, fork, wait, waitpid, wait3, wait4, signal, kill, exit, getcwd, chdir, stat, lstat, fstat, execve, dup, dup2, pipe, opendir, readdir, closedir, strerror, errno, getenv
Libft authorized Yes
Description Write a shell

It must implement the builtins like in bash:

  • echo with option ’-n’
  • cd with only a relative or absolute path
  • pwd without any options
  • export without any options
  • unset without any options
  • env without any options and any arguments
  • exit without any options

; in the command should separate commands like in bash.

and " should work like in bash except for multiline commands.

Redirections < > >> should work like in bash except for file descriptor aggregation.

Pipes | should work like in bash except for multiline commands.

Environment variables ($followed by characters) should work like in bash.

$? should work like in bash.

ctrl-C, ctrl-D and ctrl-\ should have the same result as in bash.

Getting Started

Installation

  1. Clone the repository
    git clone https://github.com/pabloocg/minishell.git
  2. Enter the repository and run make
    cd minishell && make

Usage

./minishell

License

Distributed under the GNU GPLv3. See LICENSE for more information.

Contact

Pablo Cuadrado García
Linkedin - pablocuadrado97@gmail.com

About

Simple Shell written in C.

Topics

Resources

License

Stars

Watchers

Forks

Contributors