/simple_shellz

Team Alx Project Task

Primary LanguageC

C - Simple Shell

This project is a simple UNIX command interpreter, inspired by the original Unix shell.

Logo

Concepts

Basics of programming
Basics of C
Basics of thinking like an engineer
Group work
Learning how to learn

Background Context

The goal of this project is to write a simple UNIX command interpreter. It's an opportunity to apply your knowledge of C programming, understand how a shell works, and enhance your skills in team collaboration.

Important Note from Julien

Julien emphasizes the importance of understanding the framework, not copying solutions, and learning how to walk toward the solution instead of memorizing it. Collaboration is encouraged, but both partners are responsible for the code pushed to GitHub. Cheating, plagiarism, and shortcuts are strongly discouraged.

Learning Objectives

By the end of this project, you should be able to explain various concepts, including:

General history and details about the original Unix operating system The design and implementation of the UNIX shell Basics of the C programming language and its predecessor, B programming language Knowledge about Ken Thompson Understanding of how a shell works Concepts like pid, ppid, system calls, and functions Manipulating the environment of the current process Execution of other programs with the execve system call Handling the PATH to find programs Suspension of process execution until a child terminates Understanding EOF (end-of-file)

Output

Program output must match sh (/bin/sh) for both normal and error output.

Made for ALX SE Program

Running Tests

To run tests, run the following command

  gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh

Tasks

Task Name Description
Betty would be proud Write a beautiful code that passes the Betty checks.
Simple shell 0.1 Write a UNIX command line interpreter.
Simple shell 0.2 Enhance the shell to handle command lines with arguments.
Simple shell 0.3 Further improve the shell to handle the PATH.
Simple shell 0.4 Implement the exit built-in command to exit the shell.
Simple shell 1.0 Implement the env built-in command to print the current environment.
Simple shell 0.1.1 (Advanced) Write your own getline function.
Simple shell 0.2.1 (Advanced) Avoid using strtok in your implementation.
Simple shell 0.4.1 (Advanced) Handle arguments for the built-in exit command
setenv, unsetenv (Advanced) Implement the setenv and unsetenv built-in commands.
cd (Advanced) Implement the cd built-in command to change the current directory.
; (Advanced) Handle the commands separator (;).
&& and or (Advanced) Handle the logical operators && and or.
alias (Advanced) Implement the alias built-in command.
Variables (Advanced) Handle variables replacement, including $? and $$.
Comments (Advanced) Handle comments in the shell.
File as input (Advanced) Enable the shell to take a file as a command line argument.

Developers:

Ahmed B.Ramzy (AKA RAMZY) Ashraf Atef (AKA Ashraf)
@Ahmed Ramzy @Ashraf Atef
Ahmed Ramzy Ashraf Atef
Ahmed Bassem Ramzy is currently thriving as a Health Ministry health inspector.Driven by an unwavering passion for the tech industry, Ahmed aspires to establish a prominent presence as a Software Engineer. With a remarkable history of accomplishments, Ahmed Ramzy stands out for his exceptional ability to streamline routine processes through software development, enabling faster data input. Additionally, his instrumental contribution to the construction of a comprehensive employee database, designed for efficient information retrieval, showcases his dedication to optimizing operational efficiency. Continuously pushing the boundaries of technology, Ahmed Ramzy remains steadfast in his pursuit of excellence and innovation within the tech realm. Ashraf Atef is a passionate web developer with a focus on programming and designing. He has successfully completed numerous projects, continuously pushing himself to learn and grow. Ashraf's ultimate goal is to become one of the best software engineers, collaborating with teams to develop innovative solutions and solve complex problems. His notable achievement includes creating the pioneering Drug Checker app in Egypt, enabling users to assess drug interactions using Egyptian trade names for better health management. Ashraf is dedicated, always seeking new challenges to make a difference in the field of software engineering.