Skip to content

MSX646/Minishell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell

This project was about creating a simple shell.
Like your own little bash.
Project was made with MSX646 aka kezekiel

MINISHELL GIF_1


FEATURES

Environment variables

Environment variables ($ followed by a sequence of characters) which expand to their values.

Builtins

Minishell implement the 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

Pipes:

ls | sort 

Redirections:

◦ < redirect input.

◦ > redirect output.

◦ << be given a delimiter, then read the input until a line containing the
delimiter is seen.

◦ >> redirect output in append mode

Signals

ctrl-C, ctrl-D and ctrl-\ which behave like in bash.

• In interactive mode:
    ◦ ctrl-C displays a new prompt on a new line.
    ◦ ctrl-D exits the shell.
    ◦ ctrl-\ does nothing.

History:

Have a working history.

INSTALLATION


1. Install brew and readline(for MacOS)

curl -fsSL https://rawgit.com/kube/42homebrew/master/install.sh | zsh

brew install readline

2. Replace username in Makefile

Replace USER with your username

RDLN = -L /Users/USER/.brew/Cellar/readline/8.1.2/lib -I /Users/USER/.brew/Cellar/readline/8.1.2/include/ -lreadline

COMPILATION


Use "make" to compile minishell

make

Use "make re" to re-compile minishell

make re

Use "make fclean" to delete obj files

make fclean

MINISHELL_2

About

Minishell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.4%
  • Makefile 2.6%