Skip to content

elhayyany/mini_shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini_shell

Introduction

Minishell is a project that aims to build a simple shell from scratch using C. The goal is to understand the inner workings of programming languages and operating systems while implementing core shell functionalities.

Talk

During an exhilarating and challenging project, my teammate and I embarked on an incredible journey of building our own shell from scratch using C. This experience delved deep into the inner workings of programming languages and the foundations of operating systems, solidifying our knowledge in various areas.

From the start, our project demanded a mastery of C programming and a deep understanding of processes and file descriptors. We delved into parsing commands, implementing redirections, handling pipes, and executing system commands, expanding our technical expertise significantly.

Beyond the technical aspects, this project taught us invaluable lessons in teamwork and problem-solving. Collaborating with my teammate was a journey of effective communication, task delegation, and leveraging each other's strengths. Together, we tackled challenges head-on, finding creative solutions and nurturing a strong partnership. This experience underscored the immense importance of collaboration in achieving successful outcomes.

Moreover, completing the Minishell project provided me with a robust foundation in shell scripting. Understanding the inner workings of bash not only enhanced my ability to work with it but also enabled me to adapt swiftly to new programming languages. The underlying knowledge gained has proven instrumental in my efficiency and adaptability across diverse projects and programming languages.

I'm particularly proud to mention that our project was developed using our own C library, which we meticulously crafted as our first endeavor at 1337. This experience further deepened my understanding of low-level programming and laid the groundwork for future projects.

Reflecting on this project fills me with immense gratitude for my teammate's unwavering collaboration and guidance throughout the entire process. Together, we conquered challenges, exchanged knowledge, and achieved remarkable results. I'm forever grateful for the supportive environment provided by our beloved school, 1337.

Stay tuned for more updates on my journey as a programmer, and feel free to reach out if you'd like to learn more about the Minishell project, my experiences in teamwork and problem-solving, or if you have any questions. Let's connect and explore new opportunities!

Features

  • Display a prompt when waiting for a new command.
  • Implement history to recall previous commands.
  • Search and launch executables based on the PATH variable or given paths.
  • Handle redirections (<, >, <<, >>) for input and output.
  • Support pipes (|) to connect commands in a pipeline.
  • Expand environment variables ($ followed by characters).
  • Interpret single quotes ('), preventing metacharacter interpretation.
  • Handle ctrl-C, ctrl-D, and ctrl-\ signals as expected.
  • Implement built-in commands: echo, cd, pwd, export, unset, env, and exit.

Learning Experience

Building Minishell has been a rewarding learning experience:

Technical Skills Gained:

  • Proficient in C programming and low-level memory management.
  • Deep understanding of processes and file descriptors.
  • Parsing and executing user commands.
  • Implementing advanced features like redirection and pipes.
  • Utilizing the readline library for input handling.
  • Understanding how a programing language actually works.
  • Easy to learn any other technology

Teamwork and Problem-Solving:

  • Collaborating with my teammate, we effectively divided tasks and communicated to achieve common goals.
  • Tackling challenges together, finding creative solutions, and supporting each other throughout the project.

Bash Scripting and Adaptability:

  • Understanding how bash works allowed me to work with it more effectively.
  • The knowledge gained enables me to quickly adapt to new programming languages.

Usage

  1. Clone the repository: git@github.com:elhayyany/mini_shell.git
  2. Build the project: make
  3. Run the Minishell: ./minishell
  4. if it doesn't compile itmeans you need to install readline library.

Acknowledgments

Special thanks to our beloved school, 1337, for providing the environment and resources for this project.

Contact

Feel free to reach out if you have any questions or want to know more about this project. Let's connect on LinkedIn!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors