Skip to content

MichelleJiam/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

42/Codam minishell, a simple shell based on bash

Description

A collaborative group project that has us writing our own simple little shell in C.

The shell takes single-line inputs and replicates bash behaviour.

It supports:

  • redirections - <, >, and >>.
  • pipes - |
  • separating semicolons - ;
  • single and double quotes - ' "
  • escape character - \
  • environment variables - $
  • ctrl-C, ctrl-D, and ctrl-\

Implemented builtins:

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

Commands

# Build
make

# Run
./minishell

Demo

Resources

Bash repo

man pages for bash commands

A guide to writing your own shell from Introduction to Systems Programming

A detailed breakdown of how the shell interprets commands

Pipes, forks, and dups - data flows explained

An explanation of shell operators

Environment variable naming conventions

Process statuses

Special exit codes (version-dependant)

Releases

No releases published

Packages

No packages published