[go: up one dir, main page]

Skip to content

kylr42/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

Shell for Unix👹

About

Minishell is the project of the school21. It's a minimum viable version of a real shell. The main goal is to have a good understanding of process creation and synchronisation using the C programmming language.

Installation & Usage

Requirements

The only requirements are:

  • GNU make (v3.81)
  • GCC (v4.2.1)
  • Readline (v6.1)

Those versions are the ones used during development.

Building the program

  1. Download/Clone this repo

     git clone https://github.com/kylr42/minishell
    
  2. Install the requirements

     curl -fsSL https://rawgit.com/kube/42homebrew/master/install.sh | zsh
     brew install readline
    
  3. cd into the root directory and run make

     cd minishell
     make
    

Running the program

After building the source, run ./minishell from the project root.

Main Project Instructions

Available options

Minishell runs executables from an absolute, relative or environment PATH (/bin/ls or ls), including arguments or options. ' and " work the same as bash, except for multiline commands.

You can separate commands with ;, as well as use redirections > >> < and pipes |.

Environment variables are handled, like $HOME, including the return code $?.

Finally, you can use Ctrl-C to interrupt and Ctrl-\ to quit a program, as well as Ctrl-D to throw an EOF, same as in bash.

A few of the functions are "built-in", meaning we don't call the executable, we re-coded them directly. It's the case for echo, pwd, cd, env, export, unset and exit.

About

21 project: Shell for Unix👹

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published