Skip to content

The Simple Shell project is an implementation of a simple UNIX command-line interpreter written in C. This project is designed to provide an understanding of how a shell works, including parsing commands, handling built-in functions, and executing programs.

Notifications You must be signed in to change notification settings

Younis-Ahmed/simple_shell

Repository files navigation

Simple Shell

Introduction

The Simple Shell project is an implementation of a simple UNIX command-line interpreter written in C. This project is designed to provide an understanding of how a shell works, including parsing commands, handling built-in functions, and executing programs.

Features

  • Command execution: Executes commands found in the system's PATH.
  • Built-in commands: Includes basic built-in commands like cd, exit, etc.
  • Command parsing: Handles command-line arguments, including quotes and escape sequences.
  • Error handling: Provides basic error messages for common issues.
  • Environment variables: Supports environment variables.

Installation

To install and run the Simple Shell, follow these steps:

  1. Clone the repository:
    git clone https://github.com/Younis-Ahmed/simple_shell.git
  2. Navigate to the project directory:
    cd simple_shell
  3. Compile the shell:
    gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
  4. Run the shell:
    ./hsh

Usage

Once the shell is running, you can execute commands just like in a standard UNIX shell. Here are a few examples:

  • Running a command:
    $ ls -l
  • Changing directory:
    $ cd /path/to/directory
  • Exiting the shell:
    $ exit

Contribution

If you would like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature-branch
  3. Make your changes and commit them:
    git commit -m "Description of changes"
  4. Push to the branch:
    git push origin feature-branch
  5. Create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Recent Commits

Here are some recent commits to the project:

  • Update README.md
  • Add hsh to .gitignore
  • Add README.md file with shell instructions and notes
  • Add main.h header file
  • Add main.c file with initial code

About

The Simple Shell project is an implementation of a simple UNIX command-line interpreter written in C. This project is designed to provide an understanding of how a shell works, including parsing commands, handling built-in functions, and executing programs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages