An open API service indexing awesome lists of open source software.

https://github.com/orlovt/c-shell

Low level implementation of a shell in C
https://github.com/orlovt/c-shell

Last synced: about 1 year ago
JSON representation

Low level implementation of a shell in C

Awesome Lists containing this project

README

          

# C-shell

## Description
This repository contains a simple low level implementation of a Unix shell in C. It includes basic shell commands like `cd`, `ls`, and `wc`, each implemented in their own C files. This implementation also includes the `pipe` and `STDOUT` redirection functionality. The `shell.c` file contains the main shell loop and logic. This project is suitable for educational purposes, for those interested in understanding how shell commands are implemented at a lower level.

## Installation
To install, clone the repository and use the provided Makefile:
```
git clone https://github.com/orlovt/C-shell.git
cd C-shell
make
```

## Usage
After compiling, you can run the shell executable:
```
./shell
[C-shell]/Users/path/to/repo/C-shell$
```
From there, you can use the implemented commands within this custom shell environment.

```
[C-shell]/Users/path/to/repo/C-shell$ ls -R \path/to/dir
```

```
[C-shell]/Users/path/to/repo/C-shell$ ls -R | wc > out.txt
```