Git Product home page Git Product logo

42sp-minishell's Introduction

42 Cursus

minishell

minishell_logo

Minishell is a project designed to give you hands-on experience in building a simplified shell. The shell is a fundamental component of Unix-based systems, and understanding how it works is crucial for anyone working with system-level programming.

Description

In this project, it was developed a simplified shell that allows users to interact with the operating system through a command-line interface. The goal is to implement core features of a shell, including command execution, built-in commands, input/output redirection, and the use of pipes. Inside this repository, you can see all the code that has been created for the Minishell project, including the mandatory part and the bonus part. The project was done in collaboration with Giovanna Coqueiro

Mandatory

Create a program that works like a shell, following the next conditions.

  • Display a prompt when waiting for a new command
  • Have a working history
  • Search and launch the right executable(using relative path, absolute path or just the the name of the command)
  • Handle '
  • Handle "
  • Implement redirections: '<', '>', '<<', '>>'
  • Implemente pipes
  • Handle environment variables
  • Handle exit status with $?
  • Handle signals: 'ctrl-C', 'ctrl-\', 'ctrl-D'
  • Implement builtins: 'cd', 'pwd', 'echo', 'exit', 'unset', 'export, 'env'

you can run it with:

./minishell

Bonus

Bonus Status
Manage '||' and '&&' with parenthesis not implemented
Manage wildcards not implemented
Manage variables expansion inside ' and " implemented

Instructions to use

Clone this repository in you local computer using a terminal:
git clone [email protected]:beatrizdile/42sp-minishell.git

After cloning the project in your local reposiory you can run some commands you can find in Makefile:

  • $> make all: or just make compiles the project
  • $> make clean: deletes the object files created during compilation
  • $> make fclean: executes the clean command and also deletes the binary created
  • $> make re: executes the fclean command followed by the all command
  • $> make bonus: compiles the project
  • $> make rebonus: executes the fclean command followed by the rebonus command
  • $> make run: executes all and run the program
  • $> make val: executes all and run the program with valgrind

42sp-minishell's People

Contributors

beatrizdile avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.