Skip to content

Muawia24/simple_shell

Repository files navigation

Simple Shell Project

This project implements a simple command-line shell similar to existing shells like Bash or Zsh. About

This project aims to provide a basic understanding of shell programming by implementing functionalities like:

  • Accepting user input for commands.
  • Executing built-in commands or external programs.
  • Handling arguments passed to commands.
  • Providing basic error handling.

This project can serve as a learning tool for beginners interested in system programming and understanding the core functionalities of a shell. Features (This section can be expanded as you implement more features)

  • Accepts user input for commands.
  • Executes basic built-in commands like:
  • exit: Terminates the shell.
  • cd: Changes the working directory.
  • echo: Prints arguments to the console.
  • Supports basic execution of external programs with arguments.

Running the Project

Prerequisites:

A C compiler (e.g., GCC, Clang)

Compilation:

Navigate to the project directory in your terminal.

Compile the source code using your preferred compiler:

gcc -Wall *.c -o my_shell # Replace "my_shell" with your desired executable name

Execution

Run the compiled executable:

./my_shell

$       

The shell prompt will appear ($).

Enter commands and press Enter to execute them.

Type exit to exit the shell.

Future Enhancements (This section can be filled with planned features)

  • Implement additional built-in commands (e.g., ls, pwd).
  • Support command history and navigation.
  • Implement environment variables and expansion.
  • Handle I/O redirection (e.g., <, >, |).
  • Improve error handling and provide informative messages.

Contribution

This project is open to contributions. Feel free to fork the repository, add your improvements, and submit a pull request.

License

This project is licensed under Specify License Here, e.g., MIT License: https://choosealicense.com/.

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages