Coder Social home page Coder Social logo

42_minishell's Introduction

🐚MINISHELL🐚

Environment variables, redirections, command execution, built-in commands and pipes


What is this project about?

Minishell is a program written in C that behaves as a simplified version of an actual shell. You can use redirections, environment variables, pipes, built-in commands and execution of commands like you would in a normal shell.


Biggest Challenges 💪

I faced three major challenges while working on the project. Firstly, I had to learn and implement two complex concepts which were the parser and lexer. Then I faced the next two most difficult problems which were to handle the proper execution of commands that were inputted alongside pipes and/or redirections, and also ensuring the proper handling of exit codes. Additionally, it was challenging to deal with the Heredoc implementation so it worked as intended.

However, it was really interesting to learn about how to organize files and the different functions. If I had to redo the project, I would definitely take more time to design the code in a different way, even though I don't think the work was bad after all.

Built-in Commands:

This are commands that I had to program from scratch to implement them as built-in.

Command Options
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

How to use?

# Clone the repository:
git clone [email protected]:Flamiing/42_minishell.git

# Access the folder:
cd 42_minishell/

# Compile the program:
make

# To run the program:
./minishell

Demo

minishell

42_minishell's People

Contributors

flamiing 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.