Skip to content

56Kiiyuu/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was created for 42 cursus by kevlim and ssabound

Minishell

Description

Minishell is a project that recreates a shell in C. The goal is to simulate the behavior of a UNIX shell like Bash, while implementing specific features such as pipes, redirections, environment variable expansion, and built-in commands.

Features

  • Built-ins:
    • echo — prints a message. The -n option prevents adding a newline.
    • cd — changes the current directory.
    • pwd — prints the current working directory.
    • export — sets an environment variable.
    • unset — deletes an environment variable.
    • env — displays all environment variables.
    • exit — exits the shell.
  • Redirections:
    • < — redirects standard input from a file.
    • > — redirects standard output to a file.
    • << — reads input until a specific delimiter is found (heredoc).
    • >> — redirects standard output in append mode.
  • Pipes: Manages data flow between multiple commands using |.
  • Quotes: Handles single (') and double (") quotes with metacharacter protection.
  • Exit status: Handles $? expansion.

Instructions

Compilations

The project uses a Makefile to compilation:

make

Execution

./minishell

Cleanup

  • Remove object files : make clean
  • Remove object files and executable : make fclean
  • Recompile from scratch: make re

Resource

For this project we used especially documentation and the peer learning and used AI to understand diffrent concepts. Links we used :

About

minishell (Milestone 3)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors