Skip to content

RootSprout/Exsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Exsh — A Custom Unix Shell in C

Alt Text


Welcome to Exsh, A Unix like shell written in pure C. This project mimics the core behavior of Unix shells — covering command parsing, pipes, input/output redirection, process creation with fork(), and execution using execvp().

🔬 Designed for learning, OS-level process management, and understanding how real shells like Bash work.

🌟 Features

Shell Feature Exsh Implementation
Interactive Prompt Tracks command history, <C-r> search and cursor control
Command Execution Runs system commands with arguments
Pipes Connects output of one command to input of another
Input/Output Redirection (>, >>, <) Redirects stdin/stdout to files
Built-in Commands cd, exit
Process Management fork(), execvp(), wait() for process control

🚀 Getting Started

Running on Windows (WSL)

This project requires a Unix-like environment due to the use of fork(), execvp(), and pipes.

Windows users should use WSL (Ubuntu recommended):

```bash
sudo apt update
sudo apt install build-essential make gcc libreadline-dev


## Requirements
   * libc
   * gcc
   * make
   * libreadline (optional)
   * Unix based OS

## 🔧 Build

```bash
cd src
make
./build/exsh

📚 Usage Examples

$ ls -l
$ cd folder
$ ls | grep txt > out.txt
$ exit

Exsh Architecture

Alt Text

Readmore here: Exsh Blog

🤝 Contributing

We ❤️ contributors!

To contribute:

  1. Fork the repository.
  2. Clone it locally:
    git clone [repo]
    cd exsh/src
    git checkout -b feature/my-improvement

License

@Meerthika

About

A Unix-like shell in C

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors