GitHub - Gasimhacker/simple_shell

Simple Shell

Simple Shell is a project for the ALX Software Engineering program, aiming to create a basic replica of the Unix shell. It provides a command-line interface where users can interact with the operating system by executing commands.

This Simple Shell implementation supports the execution of both built-in commands and external commands available in the system's PATH. It provides features such as command execution, handling command-line arguments, environment variable expansion, and more.

Features

  • Executes built-in commands such as cd, env, setenv, unsetenv, alias, and exit.
  • Executes external commands available in the system's PATH.
  • Supports command-line arguments, allowing users to pass arguments to commands.
  • Handles environment variable expansion, allowing users to reference and expand variables in command arguments.
  • Provides a basic prompt for input and command execution.
  • Handles signals such as Ctrl+C to interrupt command execution.
  • Provides error handling and informative error messages.

Getting Started

To get started with the Simple Shell project, follow these steps:

  1. Clone the repository: git clone https://github.com/your-username/simple-shell.git.
  2. Compile the source code using a C compiler: gcc -Wall -Werror -Wextra -pedantic *.c -o shell.
  3. Run the shell: ./shell.

Usage

The Simple Shell provides a command-line interface where you can enter commands. Here are some examples:

  • Execute a command:

    $ ls -l

  • Execute a built-in command:

    $ cd directory/

  • Use command-line arguments:

    $ echo Hello, World!

  • Use environment variable expansion:

    $ echo $HOME

Contributing

Contributions to the Simple Shell project are welcome! If you'd like to contribute, please follow these guidelines:

  1. Fork the repository and create a new branch.
  2. Make your changes, following the project's coding style and guidelines.
  3. Write tests for your changes, ensuring proper functionality.
  4. Submit a pull request, explaining the changes you've made.

Contact

For questions, feedback, or suggestions, feel free to contact the project maintainers: